ReactCodeTag is a react component which will show your code example in more readable way. With rows number, saved structure, possibility to copy, styled as you wish.
$ npm i react-code-tag
$ yarn add react-code-tag
import CodeTag from "react_code_tag"
const yourCode = function () {
console.log('hello')
}
...
render () {
return <CodeTag code={yourCode} />
}
const style = {
codeColor: '#11fffb',
borderColor: '#ff0303',
backgroundColor: '#4f67d1',
rowNumberColor: '#000',
}
...
render () {
return <CodeTag code={/* your code */} style={style}/>
}
4.1 git clone https://github.com/SVladikO/react-code-tag.git
4.2 cd react-code-tag
4.3 npm install
4.4 npm run start