carbon-react-code-mirror

0.2.3 • Public • Published

carbon-react-code-mirror

Carbon React Code Mirror is a wrapper for @uiw/react-codemirror that uses Carbon styling.

Install

npm i carbon-react-code-mirror

Usage

import React from "react";
import { CarbonCodeMirror } from "carbon-react-code-mirror";

const example = () => {
  return <CarbonCodeMirror code={"<your code here>"} />;
};

Optional Props

Carbon Code Mirror accepts the following optional props:

  • className - string - Classnames to apply to the code mirror pane
  • readOnly - boolean - Defaults to true
  • light - boolean - Use light mode, defaults to false
  • children - node - React nodes to render within the code mirror container
  • wrapperClassName - string - optionally set the classname for the div surrounding code mirror window

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.3
    3
    • latest

Version History

Package Sidebar

Install

npm i carbon-react-code-mirror

Weekly Downloads

4

Version

0.2.3

License

none

Unpacked Size

48.9 kB

Total Files

17

Last publish

Collaborators

  • jvallexm