Skip to content

v3.0.0

Choose a tag to compare

@mustaphaturhan mustaphaturhan released this 18 May 08:06
· 13 commits to master since this release

Added

  • Typescript support.

🔥💥 Breaking Changes

  • There is no need to import defaults to extend/change default theme anymore. chakra-ui-markdown-renderer will merge default and your theme together automatically. If you have ...defaults in your theme, you may delete it safely.
import ChakraUIRenderer from 'chakra-ui-markdown-renderer';

const newTheme = {
  p: props => {
    const { children } = props;
    return <Text mb={2} fontSize={'12px'}>{children}</Text>;
  },
}

<ReactMarkdown
  components={ChakraUIRenderer(newTheme)}
  children={markdown}
  escapeHtml={false}
/>;