storybook/docs/snippets/svelte/my-component-with-env-variables.native-format.mdx
2022-11-17 16:33:22 +01:00

18 lines
392 B
Plaintext

```html
<!-- MyComponent.stories.svelte -->
<script>
import { Meta, Template, Story } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
</script>
<meta title="MyComponent" component="{MyComponent}" />
<template let:args>
<MyComponent {...args} />
</template>
<Story name="ExampleStory" args={{ propertyA: process.env.STORYBOOK_DATA_KEY, }} />
```