Open itsjavi opened 10 months ago
Add simple Markdown support, to prepend documentation to each story file.
It can be done via: https://www.npmjs.com/package/@mdx-js/rollup
E.g. if button.stories.tsx has a button.stories.md or mdx, it will be parsed and prepended to the stories.
button.stories.tsx
button.stories.md
mdx
Or.. we can investigate if we can provide a docs option in the Story object, that can be a mdx import, like:
docs
import variant1Docs from './docs/button/variant1.mdx'; export const buttonVariant1: Story = { // ... docs: variant1Docs, // ... }
With the latest release, this should be possible. We only need to support the docs property as a JSX component or React node.
Add simple Markdown support, to prepend documentation to each story file.
It can be done via: https://www.npmjs.com/package/@mdx-js/rollup
E.g. if
button.stories.tsx
has abutton.stories.md
ormdx
, it will be parsed and prepended to the stories.Or.. we can investigate if we can provide a
docs
option in the Story object, that can be a mdx import, like: