import './src/styles/main.css'; import * as React from 'react'; import { MDXProvider } from '@mdx-js/react'; const SpoilerComponent = ({ children, title }) => { const [show, setShow] = React.useState(false); return (

setShow(!show)} style={{ marginBottom: 0 }} > {show && ( )} {!show && ( )} {title}

{show &&
{children}
}
); }; const components = { 'module-excerpt': props =>
, spoiler: SpoilerComponent, 'info-block': ({ children, title, }: { children: React.ReactNode; title: string; }) => (

{title}

{children}
), 'optional-content': ({ children, title, className, }: { children: React.ReactNode; title?: string; className?: string; }) => (
Optional{title ? `: ${title}` : ''}
{children}
), }; export const wrapRootElement = ({ element }) => ( {element} );