storybook/docs/snippets/common/my-component-env-var-config.mdx.mdx
2022-03-16 21:08:56 +00:00

23 lines
430 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import { MyComponent } from './MyComponent';
<Meta title="MyComponent" component={MyComponent}/>
export const Template = (args) => ({
//👇 Your template goes here
});
<Canvas>
<Story
name="ExampleStory"
args={{
exampleProp: process.env.EXAMPLE_VAR,
}}>
{Template.bind({})}
</Story>
</Canvas>
```