mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
7.2 KiB
7.2 KiB
import type { Meta, StoryObj } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { CommonModule } from '@angular/common';
import { List } from './list.component';
const meta: Meta<List> = {
component: List,
decorators: [
moduleMetadata({
declarations: [List],
imports: [CommonModule],
}),
],
};
export default meta;
type Story = StoryObj<List>;
// Always an empty list, not super interesting
export const Empty: Story = {
render: (args) => ({
props: args,
template: `<app-list></app-list>`,
}),
};
import { createList } from './List';
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: 'List',
};
// Always an empty list, not super interesting
export const Empty = {
render: (args) => createList(args),
};
import type { Meta, StoryObj } from '@storybook/html';
import { createList, ListArgs } from './List';
const meta: Meta<ListArgs> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'List',
};
export default meta;
type Story = StoryObj<ListArgs>;
// Always an empty list, not super interesting
export const Empty: Story = {
render: (args) => createList(args),
};
import { List } from './List';
export default {
component: List,
};
// Always an empty list, not super interesting
export const Empty = {};
import type { Meta, StoryObj } from '@storybook/react';
import { List } from './List';
const meta = {
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
// Always an empty list, not super interesting
export const Empty: Story = {};
import type { Meta, StoryObj } from '@storybook/react';
import { List } from './List';
const meta: Meta<typeof List> = {
component: List,
};
export default meta;
type Story = StoryObj<typeof List>;
// Always an empty list, not super interesting
export const Empty: Story = {};
import { List } from './List';
export default {
component: List,
};
// Always an empty list, not super interesting
export const Empty = {};
import type { Meta, StoryObj } from 'storybook-solidjs';
import { List } from './List';
const meta = {
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
// Always an empty list, not super interesting
export const Empty: Story = {};
import type { Meta, StoryObj } from 'storybook-solidjs';
import { List } from './List';
const meta: Meta<typeof List> = {
component: List,
};
export default meta;
type Story = StoryObj<typeof List>;
// Always an empty list, not super interesting
export const Empty: Story = {};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import List from './List.svelte';
const { Story } = defineMeta({
component: List,
});
</script>
<!-- Always an empty list, not super interesting -->
<Story name="Empty" />
import List from './List.svelte';
export default {
component: List,
};
// Always an empty list, not super interesting
export const Empty = {};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import List from './List.svelte';
const { Story } = defineMeta({
component: List,
});
</script>
<!-- Always an empty list, not super interesting -->
<Story name="Empty" />
import type { Meta, StoryObj } from '@storybook/svelte';
import List from './List.svelte';
const meta = {
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
// Always an empty list, not super interesting
export const Empty: Story = {};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import List from './List.svelte';
const { Story } = defineMeta({
component: List,
});
</script>
<!-- Always an empty list, not super interesting -->
<Story name="Empty" />
import type { Meta, StoryObj } from '@storybook/svelte';
import List from './List.svelte';
const meta: Meta<typeof List> = {
component: List,
};
export default meta;
type Story = StoryObj<typeof List>;
// Always an empty list, not super interesting
export const Empty: Story = {};
import List from './ListComponent.vue';
export default {
component: List,
};
// Always an empty list, not super interesting
export const Empty = {
render: () => ({
components: { List },
template: '<List/>',
}),
};
import type { Meta, StoryObj } from '@storybook/vue3';
import List from './ListComponent.vue';
const meta = {
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
// Always an empty list, not super interesting
export const Empty: Story = {
render: () => ({
components: { List },
template: '<List/>',
}),
};
import type { Meta, StoryObj } from '@storybook/vue3';
import List from './ListComponent.vue';
const meta: Meta<typeof List> = {
component: List,
};
export default meta;
type Story = StoryObj<typeof List>;
// Always an empty list, not super interesting
export const Empty: Story = {
render: () => ({
components: { List },
template: '<List/>',
}),
};
import { html } from 'lit';
export default {
component: 'demo-list',
};
// Always an empty list, not super interesting
export const Empty = {
render: () => html`<demo-list></demo-list>`,
};
import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-list',
};
export default meta;
type Story = StoryObj;
// Always an empty list, not super interesting
export const Empty: Story = {
render: () => html`<demo-list></demo-list>`,
};