storybook/docs/snippets/vue/my-component-with-env-variables.3.js.mdx
2021-08-28 01:52:57 +01:00

23 lines
377 B
Plaintext

```js
// MyComponent.stories.js
import MyComponent from './MyComponent.vue';
export default {
component: MyComponent,
};
export const ExampleStory = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
render: (args) => ({
components: { MyComponent },
setup() {
return { args };
},
template: `<MyComponent v-bind="args"/>`,
}),
};
```