Releases: mustaphaturhan/chakra-ui-markdown-renderer
Releases · mustaphaturhan/chakra-ui-markdown-renderer
v4.1.0
v4.0.0
🔥💥 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 fromreact-markdown
while it was coming fromreact-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
Fixed
- Fixes
deepmerge
error that occures onnextjs
.
v3.0.0
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
🔥💥 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
Major Changes
- Now List type are using
UnorderedList
andOrderedList
components according to providing type. - Fixes
List
sspacing
wrong property. Changes24
to2
.
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
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
- Ability to extend defaults. Allow users to pass in an object as parameter and extend defaults.