docs/_snippets/button-story-rename-story.md
import type { Meta, StoryObj } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
component: Button,
};
export default meta;
type Story = StoryObj<Button>;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import preview from '../.storybook/preview';
import { Button } from './button.component';
const meta = preview.meta({
component: Button,
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});
import { createButton } from './Button';
export default {
render: (args) => createButton(args),
};
export const Primary = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import type { Meta, StoryObj } from '@storybook/html';
import { createButton, ButtonArgs } from './Button';
const meta: Meta<ButtonArgs> = {
render: (args) => createButton(args),
};
export default meta;
type Story = StoryObj<ButtonArgs>;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import { Button } from './Button';
export default {
component: Button,
};
export const Primary = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, nextjs-vite, etc.
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';
const meta = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import { Button } from './Button';
export default {
component: Button,
};
export const Primary = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import type { Meta, StoryObj } from 'storybook-solidjs-vite';
import { Button } from './Button';
const meta = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import Button from './Button.svelte';
const { Story } = defineMeta({
component: Button,
});
</script>
<Story
name="I am the primary"
exportName="Primary"
/>
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import Button from './Button.svelte';
const { Story } = defineMeta({
component: Button,
});
</script>
<Story
name="I am the primary"
exportName="Primary"
/>
import Button from './Button.svelte';
export default {
component: Button,
};
export const Primary = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
// Replace your-framework with the framework you are using, e.g. sveltekit or svelte-vite
import type { Meta, StoryObj } from '@storybook/your-framework';
import Button from './Button.svelte';
const meta = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import Button from './Button.vue';
export default {
component: Button,
};
export const Primary = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import type { Meta, StoryObj } from '@storybook/vue3-vite';
import Button from './Button.vue';
const meta = {
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
export default {
component: 'demo-button',
};
export const Primary = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import type { Meta, StoryObj } from '@storybook/web-components-vite';
const meta: Meta = {
component: 'demo-button',
};
export default meta;
type Story = StoryObj;
export const Primary: Story = {
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
};
import preview from '../.storybook/preview';
const meta = preview.meta({
component: 'demo-button',
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});
import preview from '../.storybook/preview';
const meta = preview.meta({
component: 'demo-button',
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});
import preview from '../.storybook/preview';
import Button from './Button.vue';
const meta = preview.meta({
component: Button,
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});
import preview from '../.storybook/preview';
import Button from './Button.vue';
const meta = preview.meta({
component: Button,
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});
import preview from '../.storybook/preview';
import { Button } from './Button';
const meta = preview.meta({
component: Button,
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});
import preview from '../.storybook/preview';
import { Button } from './Button';
const meta = preview.meta({
component: Button,
});
export const Primary = meta.story({
// ๐ Rename this story
name: 'I am the primary',
args: {
label: 'Button',
primary: true,
},
});