UNPKG

@compositor/x0

Version:

Document & develop React components without breaking a sweat

21 lines (19 loc) 455 B
import React from 'react' import { MDXProvider } from '@mdx-js/tag' import { ScopeProvider } from 'react-scope-provider' import defaultScope from './scope' export default props => { const scope = { ...defaultScope, ...props.scope } return ( <ScopeProvider scope={scope}> <MDXProvider components={scope}> <React.Fragment> {props.children} </React.Fragment> </MDXProvider> </ScopeProvider> ) }