diff --git a/libs/sketch/src/lib/components/list/list.component.stories.ts b/libs/sketch/src/lib/components/list/list.component.stories.ts new file mode 100644 index 0000000..c0fbe9a --- /dev/null +++ b/libs/sketch/src/lib/components/list/list.component.stories.ts @@ -0,0 +1,113 @@ +import { + applicationConfig, + Meta, + moduleMetadata, + StoryObj, +} from '@storybook/angular'; +import { ListComponent } from './list.component'; +import { provideRouter } from '@angular/router'; +import { CommonModule } from '@angular/common'; +import { ListItemComponent } from './components/list-item/list-item.component'; +import { ListProviderDirective } from './directives/list-provider.directive'; +import { ListItemActiveDirective } from './directives/list-item-active.directive'; + +const meta: Meta = { + component: ListComponent, + title: 'ListComponent', + decorators: [ + applicationConfig({ + providers: [provideRouter([])], + }), + moduleMetadata({ + imports: [ + CommonModule, + ListItemComponent, + ListProviderDirective, + ListItemActiveDirective, + ], + }), + ], +}; +export default meta; +type Story = StoryObj; + +export const Default: Story = { + render: (args) => ({ + props: args, + template: ` + + Label 1 + + + Label 2 + + + Label 3 + + + Label 4 + + `, + }), +}; + +export const Nested: Story = { + render: (args) => ({ + props: args, + template: ` + + Label 1 + + + Label 11 + + + Label 12 + + + Label 13 + + + Label 14 + + + + + Label 2 + + + Label 21 + + + Label 22 + + + + + Label 3 + + + Label 31 + + + Label 32 + + + Label 33 + + + + + Label 4 + + + Label 41 + + + Label 42 + + + + `, + }), +};