Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
Latest commit 966715f Sep 23, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Edit theme Sep 16, 2018
src Adjust pre styles Sep 23, 2018
test Init Sep 16, 2018
.gitignore Init Sep 16, 2018
.npmignore Init Sep 16, 2018
README.md Init Sep 16, 2018
babel.config.js Dedupe CSS rules Sep 16, 2018
package-lock.json 1.0.0-3 Sep 23, 2018
package.json 1.0.0-3 Sep 23, 2018
themes.js Add themes Sep 16, 2018

README.md

mdx-style

Add styles to markdown elements in MDX

npm i mdx-style
import React from 'react'
import MDXStyle from 'mdx-style'
import Doc from './doc.mdx'

export default () =>
  <MDXStyle
    css={{
      root: {
        fontFamily: 'system-ui, sans-serif',
        lineHeight: 1.625,
        color: '#111'
      },
      h1: {
        fontSize: 48,
        color: 'purple'
      },
      a: {
        color: 'blue',
        '&:hover': {
          color: 'purple'
        }
      }
    }}>
    <Doc />
  </MDXStyle>

Props

  • css
  • components

MIT License

You can’t perform that action at this time.