rc-code-formatter

0.0.3 • Public • Published

Code Formatter Component For React

Features

  • Format your code with different color schemes

Installation

npm install rc-code-formatter
import React from 'react';
import CodeFormatter from 'rc-code-formatter';
const myCode = `
import React from 'react';
import ReactDom from 'react-dom';
function App() {
    return (
        <CodeFormatter theme="dark">
            {myCode}
        </CodeFormatter>
    )
}

`;

function App() {
    return (
        <CodeFormatter theme="dark">
            {myCode}
        </CodeFormatter>
    )
}
Props Type Description
theme string Property to define your code formatter either light or dark
children string Template literals string of your code

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i rc-code-formatter

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

6.11 kB

Total Files

5

Last publish

Collaborators

  • qubaish