Carbon React Code Mirror is a wrapper for [@uiw/react-codemirror](https://www.npmjs.com/package/@uiw/react-codemirror) that uses Carbon styling.
npm install carbon-react-code-mirrorCarbon React Code Mirror is a wrapper for @uiw/react-codemirror that uses Carbon styling.
``bash`
npm i carbon-react-code-mirror
`js
import React from "react";
import { CarbonCodeMirror } from "carbon-react-code-mirror";
const example = () => {
return
};
`
Carbon Code Mirror accepts the following optional props:
- className - string - Classnames to apply to the code mirror panereadOnly
- - boolean - Defaults to truelight
- - boolean - Use light mode, defaults to falsechildren
- - node - React nodes to render within the code mirror containerwrapperClassName` - string - optionally set the classname for the div surrounding code mirror window
-