Skip to content

Releases: mustaphaturhan/chakra-ui-markdown-renderer

v4.1.0

23 Jun 12:59
b480ced
Compare
Choose a tag to compare
  • Allows react-markdown v8 and chakra-ui v2 (#27, thanks @baartch)
  • Updates deprecated d=... property to display=... property.
  • Changes type definition of first parameter. heading is not accepted as a property anymore since it isn't used anywhere. Use h1, h2, h3, h4, h5, h6 instead.

v4.0.0

19 Nov 14:03
b634a53
Compare
Choose a tag to compare

🔥💥 Breaking Changes

  • react-markdown is updated to ^7. I did everything I can do to not create a breaking change but unfortunately, Components type is coming from react-markdown while it was coming from react-markdown/src/ast-to-react in version 6.
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} />;

v3.0.1

20 May 06:48
Compare
Choose a tag to compare

Fixed

  • Fixes deepmerge error that occures on nextjs.

v3.0.0

18 May 08:06
Compare
Choose a tag to compare

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}
/>;

v2.0.0

14 May 19:36
Compare
Choose a tag to compare

🔥💥 Breaking Changes

  • Theme is revisited for react-markdown v6 big thanks to @davidgit. Please be careful before update your dependencies. This update can break your all markdown settings.

To migrate to new version, change renderers prop with components like react markdown says.

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

v1.1.0

05 Feb 07:14
Compare
Choose a tag to compare

Major Changes

  • Now List type are using UnorderedList and OrderedList components according to providing type.
  • Fixes Lists spacing wrong property. Changes 24 to 2.

If you want to use old List's, just extend defaults and change List key with this:

list: props => {
  const { start, ordered, children, depth } = props;
  let styleType = 'disc';
  if (ordered) styleType = 'decimal';
  if (depth === 1) styleType = 'circle';
  return (
    <List
      spacing={24}
      as={ordered ? 'ol' : 'ul'}
      styleType={styleType}
      pl={4}
    >
      {children}
    </List>
);

v1.0.0

16 Dec 08:21
Compare
Choose a tag to compare

Added

  • Library now uses rollup as a bundler.

🔥💥 Breaking Changes

  • No more using @chakra-ui/core like Chakra-UI did. We're using @chakra-ui/react instead of @chakra-ui/core
  • @chakra-ui/react and other dependencies that used by @chakra-ui/react now added as peerDependency. You should add @emotion/react @emotion/styled framer-motion packages to your project.

v0.2.0

17 Apr 12:21
Compare
Choose a tag to compare
  • Ability to extend defaults. Allow users to pass in an object as parameter and extend defaults.