@timberio/smackdown
v0.0.3
Published
A markdown and syntax highlighting library built for React
Downloads
13
Readme
Installation
yarn add @timberio/smackdown
Usage
import javascript from 'react-syntax-highlighter/languages/prism/javascript'
import { duotoneLight } from 'react-syntax-highlighter/styles/prism'
import { Markdown, registerPrism } from '@timberio/smackdown'
// Register the required languages
registerPrism('javascript', javascript)
const syntax = {
lineNumbers: true,
theme: duotoneLight,
renderer: 'prism'
}
// Render in React
<Markdown
source="# Some markdown stuff"
syntax={syntax}
/>