0.0.1 • Published 5 years ago

typography-mdx v0.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

typography-mdx

Create MDX components from Typography.js themes

npm i typography-mdx
import React from 'react'
import typographyMDX from 'typography-mdx'
import { MDXProvider } from '@mdx-js/tag'
import { GoogleFont } from 'react-typography'
import wordpress2016 from 'typography-theme-wordpress-2016'
import Doc from './doc.mdx'

export default props => {
  const { Root, typography, ...components } = typographyMDX(wordpress2016)

  return (
    <MDXProvider components={components}>
      <GoogleFont typography={typography} />
      <Root>
        <Doc />
      </Root>
    </MDXProvider>
  )
}