Closed iuscare closed 3 years ago
Hi, yes I also had the wish to add markup to the yml to document my stuff. The problem right now is that a storybook component renders the description. I need to check if I can simple replace that. Will let you know.
Now markup is supported in automatic pattern generation. If you want to have the same look and feel in your mdx docs you need an
import { Meta, Title, Subtitle, Preview } from '@storybook/addon-docs/blocks';
<Preview withToolbar={true}>
<PatternPreview variant={pattern.getDefaultVariant()} columns="4" config="equal"/>
</Preview>
You simply rock! Thanks!
Is your feature request related to a problem? Please describe. We are able to write our own MDX documentaiton, which is very powerful. You've even included custom documentation tokens, which makes writing documentation less painful. Now it would only be convenient, if the layout of a story stays the same, when including it into a manual created MDX file by using
<PatternPreview>
. Up to now the<sbdocs sbdocs-preview>
wrapper with its viewport or border lines around the story gets eliminated.Describe the solution you'd like Sometimes it is useful to add additional documentation texts like you do in your grid component. So either it would be useful to add the ability to add markup within the .yml file of the pattern itself or to render imported stories with
<PatternPreview>
the same as automatic created stories.Additional context Desired Solution for every documentation - currently only automatic MDX:
Current implementation for MDX created manually: