docs/_snippets/foo-bar-baz-story.md
import type { Meta, StoryObj } from '@storybook/angular';
import { Foo } from './foo.component';
const meta: Meta<Foo> = {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Foo/Bar',
component: Foo,
};
export default meta;
type Story = StoryObj<Foo>;
export const Baz: Story = {};
import preview from '../.storybook/preview';
import { Foo } from './foo.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: 'Foo/Bar',
component: Foo,
});
export const Baz = meta.story();
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import Foo from './Foo.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: 'Foo/Bar',
component: Foo,
});
</script>
<Story name="Baz" />
import Foo from './Foo.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: 'Foo/Bar',
component: Foo,
};
export const Baz = {};
import { Foo } from './Foo';
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: 'Foo/Bar',
component: Foo,
};
export const Baz = {};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import Foo from './Foo.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: 'Foo/Bar',
component: Foo,
});
</script>
<Story name="Baz" />
// Replace your-framework with svelte-vite or sveltekit
import type { Meta, StoryObj } from '@storybook/your-framework';
import Foo from './Foo.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: 'Foo/Bar',
component: Foo,
} satisfies Meta<typeof Foo>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Baz: Story = {};
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Foo } from './Foo';
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: 'Foo/Bar',
component: Foo,
} satisfies Meta<typeof Foo>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Baz: Story = {};
import preview from '../.storybook/preview';
import { Foo } from './Foo';
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: 'Foo/Bar',
component: Foo,
});
export const Baz = meta.story();
import preview from '../.storybook/preview';
import { Foo } from './Foo';
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: 'Foo/Bar',
component: Foo,
});
export const Baz = meta.story();
import preview from '../.storybook/preview';
import Foo from './Foo.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: 'Foo/Bar',
component: Foo,
});
export const Baz = meta.story();
import preview from '../.storybook/preview';
import Foo from './Foo.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: 'Foo/Bar',
component: Foo,
});
export const Baz = meta.story();
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: 'Foo/Bar',
component: 'demo-foo',
};
export const Baz = {};
import type { Meta, StoryObj } from '@storybook/web-components-vite';
const meta: Meta = {
/* ๐ The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Foo/Bar',
component: 'demo-foo',
};
export default meta;
type Story = StoryObj;
export const Baz: Story = {};
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: 'Foo/Bar',
component: 'demo-foo',
});
export const Baz = meta.story();
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: 'Foo/Bar',
component: 'demo-foo',
});
export const Baz = meta.story();