Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Last active February 16, 2020 13:43
Show Gist options
  • Save PaulieScanlon/2f14a7e3b8f530dc1966f635b1c099d5 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/2f14a7e3b8f530dc1966f635b1c099d5 to your computer and use it in GitHub Desktop.
mdx => react => markdown
<Flex sx={{ flexWrap: "wrap" }}>
  <Box
    sx={{
      width: ["100%", "50%", "33%"]
    }}
  >
    # heading 1
  </Box>
</Flex>
@PaulieScanlon
Copy link
Author

both <Flex /> and <Box /> are provided via the components prop

const components = {
   Flex,
   Box
}

  <MDXProvider components={components}>
    {children}
  </MDXProvider>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment