storybook/docs/snippets/common/component-story-mdx-dedent.mdx.mdx
2022-02-22 23:02:42 +00:00

24 lines
346 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" />
```