docs/_snippets/list-story-with-unchecked-children.md
import { List } from './List';
//๐ Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
export default {
component: List,
};
export const OneItem = {
args: {
children: <Unchecked {...Unchecked.args} />,
},
};
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, nextjs-vite, etc.
import type { Meta, StoryObj } from '@storybook/your-framework';
import { List } from './List';
//๐ Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
const meta = {
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
export const OneItem: Story = {
args: {
children: <Unchecked {...Unchecked.args} />,
},
};
import { List } from './List';
//๐ Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
export default {
component: List,
};
export const OneItem = {
args: {
children: <Unchecked {...Unchecked.args} />,
},
};
import type { Meta, StoryObj } from 'storybook-solidjs-vite';
import { List } from './List';
//๐ Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
const meta = {
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
export const OneItem: Story = {
args: {
children: <Unchecked {...Unchecked.args} />,
},
};
import preview from '../.storybook/preview';
import { List } from './List';
//๐ Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
const meta = preview.meta({
component: List,
});
export const OneItem = meta.story({
args: {
children: <Unchecked {...Unchecked.input.args} />,
},
});
import preview from '../.storybook/preview';
import { List } from './List';
//๐ Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
const meta = preview.meta({
component: List,
});
export const OneItem = meta.story({
args: {
children: <Unchecked {...Unchecked.input.args} />,
},
});