storybook/docs/snippets/common/component-story-mdx-dedent.mdx.mdx
Norbert de Langen 5d6972902d
try this
2022-06-30 00:48:42 +02:00

25 lines
350 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Source } from '@storybook/addon-docs';
import { dedent } from 'ts-dedent';
## With code snippet
<Source
language='css'
dark
format={false}
code={dedent`
.container {
display: grid | inline-grid;
}
`}
/>
## With Story Id
<Source id="example-mycomponent--starter" />
```