docs/_snippets/button-story-hoisted.md
import type { Meta } from '@storybook/angular';
import { Button as ButtonComponent } from './button.component';
const meta: Meta<ButtonComponent> = {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
};
export default meta;
type Story = StoryObj<ButtonComponent>;
// This is the only named export in the file, and it matches the component name
export const Button: Story = {};
import preview from '../.storybook/preview';
import { Button as ButtonComponent } from './button.component';
const meta = preview.meta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();
import { Button as ButtonComponent } from './Button';
export default {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
};
// This is the only named export in the file, and it matches the component name
export const Button = {};
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, vue3-vite, etc.
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button as ButtonComponent } from './Button';
const meta = {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
} satisfies Meta<typeof ButtonComponent>;
export default meta;
type Story = StoryObj<typeof meta>;
// This is the only named export in the file, and it matches the component name
export const Button: Story = {};
export default {
title: 'Design System/Atoms/Button',
component: 'demo-button',
};
// This is the only named export in the file, and it matches the component name
export const Button = {};
import type { Meta, StoryObj } from '@storybook/web-components-vite';
const meta: Meta = {
title: 'Design System/Atoms/Button',
component: 'demo-component',
};
export default meta;
type Story = StoryObj;
// This is the only named export in the file, and it matches the component name
export const Button: Story = {};
import preview from '../.storybook/preview';
const meta = preview.meta({
title: 'Design System/Atoms/Button',
component: 'demo-button',
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();
import preview from '../.storybook/preview';
const meta = preview.meta({
title: 'Design System/Atoms/Button',
component: 'demo-component',
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();
import preview from '../.storybook/preview';
import { Button as ButtonComponent } from './Button';
const meta = preview.meta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();
import preview from '../.storybook/preview';
import { Button as ButtonComponent } from './Button';
const meta = preview.meta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();
import preview from '../.storybook/preview';
import ButtonComponent from './Button.vue';
const meta = preview.meta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();
import preview from '../.storybook/preview';
import ButtonComponent from './Button.vue';
const meta = preview.meta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Design System/Atoms/Button',
component: ButtonComponent,
});
// This is the only named export in the file, and it matches the component name
export const Button = meta.story();