Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (35 loc) · 587 Bytes

README.md

File metadata and controls

43 lines (35 loc) · 587 Bytes

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