storybook/docs/snippets/svelte/my-component-with-env-variables.js.mdx
2021-05-06 17:36:21 +01:00

21 lines
383 B
Plaintext

```js
// MyComponent.stories.js
import MyComponent from './MyComponent.svelte';
export default {
component: MyComponent,
title: 'A story using environment variables inside a .env file',
};
const Template = (args) => ({
Component: MyComponent,
props: args,
});
export const Default = Template.bind({});
Default.args = {
propertyA: process.env.STORYBOOK_DATA_KEY,
};
```