@startupjs/mdx
v0.54.27
Published
MDX provider with a set of custom components for react-native support and syntax highlighting
Keywords
Readme
startupjs mdx
MDXProvider with a set of custom components for react-native support and syntax highlighting
Installation
yarn add @startupjs/mdxRequirements
react: 16.9 - 17Usage
Wrap your <App /> into the MDXProvider.
This will allow you to import and properly render the mdx component anywhere inside the <App />.
import { MDXProvider } from '@startupjs/mdx'
<MDXProvider>
<App />
</MDXProvider>Custom components
You can specify custom markdown components by providing the components prop:
import { MDXProvider } from '@startupjs/mdx'
<MDXProvider components={{ h1: props => <Text style={ color: 'red' } {...props} /> }}>
<App />
</MDXProvider>For the full list of components, look here
Licence
MIT
