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

23 lines
513 B
Plaintext

```js
// MyComponent.stories.js|jsx|ts|tsx
import { MyComponent } from './MyComponent';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
};
const Template = (args) => ({
//👇 Your template goes here
});
export const Default = Template.bind({});
Default.args = {
exampleProp: process.env.EXAMPLE_VAR,
};
```