Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: add MD support to prepend documentation #40

Open
itsjavi opened this issue Sep 1, 2023 · 1 comment
Open

[feat]: add MD support to prepend documentation #40

itsjavi opened this issue Sep 1, 2023 · 1 comment
Labels
new-feature New feature or request
Milestone

Comments

@itsjavi
Copy link
Owner

itsjavi commented Sep 1, 2023

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.

Or.. we can investigate if we can provide a docs option in the Story object, that can be a mdx import, like:

import variant1Docs from './docs/button/variant1.mdx';

export const buttonVariant1: Story = {
  // ...
  docs: variant1Docs,
  // ...
}
@itsjavi itsjavi added the new-feature New feature or request label Sep 1, 2023
@itsjavi
Copy link
Owner Author

itsjavi commented Sep 10, 2023

With the latest release, this should be possible. We only need to support the docs property as a JSX component or React node.

@itsjavi itsjavi added this to the v1.0.0 milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant