Created
December 11, 2021 13:35
-
-
Save AnishDe12020/9c031f0c3298351d09436b754adf6243 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Sandpack } from "@codesandbox/sandpack-react"; | |
import "@codesandbox/sandpack-react/dist/index.css"; | |
const CustomMDXCode = props => { | |
return ( | |
<Sandpack | |
template={props.template} | |
files={{ [`/${props.filename}`]: props.children }} | |
/> | |
); | |
}; | |
export default CustomMDXCode; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment