docs/_snippets/button-story-default-export.md
import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};
export default meta;
import preview from '../.storybook/preview';
import { Button } 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: 'Button',
component: Button,
});
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import Button from './Button.svelte';
const { Story } = defineMeta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
});
</script>
import Button from './Button.svelte';
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: 'Button',
component: Button,
};
import { Button } 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: 'Button',
component: Button,
};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import Button from './Button.svelte';
const { Story } = defineMeta({
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
});
</script>
// Replace your-framework with svelte-vite or sveltekit
import type { Meta } from '@storybook/your-framework';
import Button from './Button.svelte';
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: 'Button',
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, vue3-vite, etc.
import type { Meta } from '@storybook/your-framework';
import { Button } 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: 'Button',
component: Button,
} satisfies Meta<typeof Button>;
export default meta;
import { createButton } 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: 'Button',
};
import type { Meta } from '@storybook/html';
import { createButton, ButtonArgs } from './Button';
const meta: Meta<ButtonArgs> = {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
};
export default meta;
export default {
title: 'Button',
component: 'demo-button',
};
import type { Meta } from '@storybook/web-components-vite';
const meta: Meta = {
title: 'Button',
component: 'demo-button',
};
export default meta;
import preview from '../.storybook/preview';
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: 'Button',
component: 'demo-button',
});
import preview from '../.storybook/preview';
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: 'Button',
component: 'demo-button',
});
import preview from '../.storybook/preview';
import { Button } 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: 'Button',
component: Button,
});
import preview from '../.storybook/preview';
import { Button } 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: 'Button',
component: Button,
});
import preview from '../.storybook/preview';
import Button 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: 'Button',
component: Button,
});
import preview from '../.storybook/preview';
import Button 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: 'Button',
component: Button,
});