Back to Storybook

Other Foo Bar Story

docs/_snippets/other-foo-bar-story.md

10.3.65.7 KB
Original Source
ts
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: 'OtherFoo/Bar',
  component: Foo,
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
};

export default meta;
type Story = StoryObj<Foo>;

export const Baz: Story = {
  name: 'Insert name here',
};
ts
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: 'OtherFoo/Bar',
  component: Foo,
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
});

export const Baz = meta.story({
  name: 'Insert name here',
});
js
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: 'OtherFoo/Bar',
  component: Foo,
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
};

export const Baz = {
  name: 'Insert name here',
};
ts
// 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 { 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: 'OtherFoo/Bar',
  component: Foo,
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
} satisfies Meta<typeof Foo>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Baz: Story = {
  name: 'Insert name here',
};
js
export default {
  title: 'OtherFoo/Bar',
  component: 'demo-foo',
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
};

export const Baz = {
  name: 'Insert name here',
};
ts
import type { Meta, StoryObj } from '@storybook/web-components-vite';

const meta: Meta = {
  title: 'OtherFoo/Bar',
  component: 'demo-foo',
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
};

export default meta;
type Story = StoryObj;

export const Baz: Story = {
  name: 'Insert name here',
};
ts
import preview from '../.storybook/preview';

const meta = preview.meta({
  title: 'OtherFoo/Bar',
  component: 'demo-foo',
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
});

export const Baz = meta.story({
  name: 'Insert name here',
});
js
import preview from '../.storybook/preview';

const meta = preview.meta({
  title: 'OtherFoo/Bar',
  component: 'demo-foo',
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
});

export const Baz = meta.story({
  name: 'Insert name here',
});
ts
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: 'OtherFoo/Bar',
  component: Foo,
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
});

export const Baz = meta.story({
  name: 'Insert name here',
});
<!-- JS snippets still needed while providing both CSF 3 & Next -->
js
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: 'OtherFoo/Bar',
  component: Foo,
  // Or 'foo-bar' if you prefer
  id: 'Foo/Bar',
});

export const Baz = meta.story({
  name: 'Insert name here',
});
ts
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: 'OtherFoo/Bar',
  component: Foo,
  id: 'Foo/Bar', // Or 'foo-bar' if you prefer
});

export const Baz = meta.story({
  name: 'Insert name here',
});
<!-- JS snippets still needed while providing both CSF 3 & Next -->
js
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: 'OtherFoo/Bar',
  component: Foo,
  // Or 'foo-bar' if you prefer
  id: 'Foo/Bar',
});

export const Baz = meta.story({
  name: 'Insert name here',
});