How to show CHANGELOG page in storybook of react, typescript project
In this blog post, we'll go over the steps for showing a CHANGELOG page in your Storybook instance. By the end, you'll have a clear understanding of how to set this up and keep your CHANGELOG up to date.
To show the changelog in your React TypeScript project, you can use the mdx package to parse the Markdown file and render it as part of your story.
Steps to follow
Install the mdx package by running npm install --D markdown-to-jsx in your project directory. Save it as dev dependencies.
Create a new component that will render your changelog. You can do this by creating a new file called Changelog.tsx with the following code:
To show the changelog in your story, register component in stories.
For Example:
This code will show the changelog below your component in the storybook. You can adjust the layout
and styling to your liking.
I used the following style for the changelog it is inspired from github markdown srtyle.