@startupjs/mdx

0.55.22 • Public • Published

startupjs mdx

MDXProvider with a set of custom components for react-native support and syntax highlighting

Installation

yarn add @startupjs/mdx

Requirements

react: 16.9 - 17

Usage

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

License

MIT

/@startupjs/mdx/

    Package Sidebar

    Install

    npm i @startupjs/mdx

    Weekly Downloads

    205

    Version

    0.55.22

    License

    none

    Unpacked Size

    17 kB

    Total Files

    9

    Last publish

    Collaborators

    • cray0000
    • yska
    • zag2art
    • fctsvirus
    • maestro.sc
    • byshock