0.0.3 • Published 6 years ago

@timberio/smackdown v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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}
/>

Demos & Storybook

https://smackdown.netlify.com