0.0.3 • Published 4 years ago
rc-code-formatter v0.0.3
Code Formatter Component For React
- Demo : Live Demo
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 |