mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 06:51:19 +08:00
4.5 KiB
4.5 KiB
import type { Meta, StoryObj } from '@storybook/angular';
import { MyComponent } from './MyComponent.component';
const meta: Meta<MyComponent> = {
component: MyComponent,
};
export default meta;
type Story = StoryObj<MyComponent>;
export const ExampleStory: Story = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
const { Story } = defineMeta({
component: MyComponent,
});
</script>
<Story
name="ExampleStory"
args={{
propertyA: process.env.STORYBOOK_DATA_KEY
}}
/>
import MyComponent from './MyComponent.svelte';
export default {
component: MyComponent,
};
export const ExampleStory = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
import { MyComponent } from './MyComponent';
export default {
component: MyComponent,
};
export const ExampleStory = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
const { Story } = defineMeta({
component: MyComponent,
});
</script>
<Story
name="ExampleStory"
args={{
propertyA: process.env.STORYBOOK_DATA_KEY
}}
/>
import type { Meta, StoryObj } from '@storybook/svelte';
import MyComponent from './MyComponent.svelte';
const meta = {
component: MyComponent,
} satisfies Meta<typeof MyComponent>;
export default meta;
type Story = StoryObj<typeof meta>;
export const ExampleStory: Story = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/your-framework';
import { MyComponent } from './MyComponent';
const meta = {
component: MyComponent,
} satisfies Meta<typeof MyComponent>;
export default meta;
type Story = StoryObj<typeof meta>;
export const ExampleStory: Story = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
const { Story } = defineMeta({
component: MyComponent,
});
</script>
<Story
name="ExampleStory"
args={{
propertyA: process.env.STORYBOOK_DATA_KEY
}}
/>
import type { Meta, StoryObj } from '@storybook/svelte';
import MyComponent from './MyComponent.svelte';
const meta: Meta<typeof MyComponent> = {
component: MyComponent,
};
export default meta;
type Story = StoryObj<typeof MyComponent>;
export const ExampleStory: Story = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/your-framework';
import { MyComponent } from './MyComponent';
const meta: Meta<typeof MyComponent> = {
component: MyComponent,
};
export default meta;
type Story = StoryObj<typeof MyComponent>;
export const ExampleStory: Story = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
export default {
component: 'my-component',
};
export const ExampleStory = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};
import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'my-component',
};
export default meta;
type Story = StoryObj;
export const ExampleStory: Story = {
args: {
propertyA: process.env.STORYBOOK_DATA_KEY,
},
};