storybook/docs/snippets/svelte/my-component-with-env-variables.mdx.mdx
2021-11-06 03:20:29 +00:00

23 lines
435 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import MyComponent from './MyComponent.svelte';
<Meta title="MyComponent" component={MyComponent}/>
export const Template = (args) => ({
Component: MyComponent,
props: args,
});
<Canvas>
<Story
name="ExampleStory"
args={{
propertyA: process.env.STORYBOOK_DATA_KEY,
}}>
{Template.bind({})}
</Canvas>
```