import "./src/styles/main.css"; import 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 = { wrapper: ({ excerptOnly = false, children }) => { if (excerptOnly) { for (let child of children) { if (child.props.originalType === "module-excerpt") return child; } return null; } return children; }, "module-excerpt": (props) =>
, spoiler: SpoilerComponent, "info-block": ({ children }) => (
{children}
), }; export const wrapRootElement = ({ element }) => ( {element} );