mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:01:21 +08:00
25 lines
542 B
Plaintext
25 lines
542 B
Plaintext
```md
|
|
<!-- MyComponent.stories.mdx -->
|
|
|
|
import { Meta, Story, Canvas } from '@storybook/addon-docs';
|
|
|
|
import MyComponent from './MyComponent.svelte';
|
|
|
|
<Meta title='A MDX story using environment variables inside a .env file' component={MyComponent}/>
|
|
|
|
export const Template = (args) => ({
|
|
Component: MyComponent,
|
|
props: args,
|
|
});
|
|
|
|
<Canvas>
|
|
<Story
|
|
name='A MDX story using environment variables inside a .env file'
|
|
args={{
|
|
propertyA: process.env.STORYBOOK_DATA_KEY,
|
|
}}
|
|
>
|
|
{Template.bind({})}
|
|
</Story>
|
|
</Canvas>
|
|
``` |