import { Meta, StoryObj, componentWrapperDecorator, moduleMetadata } from "@storybook/angular"; import { CardComponent } from "../card"; import { IconButtonModule } from "../icon-button"; import { ItemModule } from "../item"; import { TypographyModule } from "../typography"; import { SectionComponent, SectionHeaderComponent } from "./"; export default { title: "Component Library/Section", component: SectionComponent, decorators: [ moduleMetadata({ imports: [ TypographyModule, SectionHeaderComponent, CardComponent, IconButtonModule, ItemModule, ], }), componentWrapperDecorator((story) => `
${story}
`), ], parameters: { design: { type: "figma", url: "https://www.figma.com/design/Zt3YSeb6E6lebAffrNLa0h/Tailwind-Component-Library?node-id=21666-19363&t=k6OTDDPZOTtypRqo-11", }, }, } as Meta; type Story = StoryObj; export const Default: Story = { render: () => ({ template: /*html*/ `

Foo

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae congue risus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc elementum odio nibh, eget pellentesque sem ornare vitae. Etiam vel ante et velit fringilla egestas a sed sem. Fusce molestie nisl et nisi accumsan dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed eu risus ex.

Bar

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae congue risus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc elementum odio nibh, eget pellentesque sem ornare vitae. Etiam vel ante et velit fringilla egestas a sed sem. Fusce molestie nisl et nisi accumsan dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed eu risus ex.

Baz

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae congue risus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc elementum odio nibh, eget pellentesque sem ornare vitae. Etiam vel ante et velit fringilla egestas a sed sem. Fusce molestie nisl et nisi accumsan dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed eu risus ex.

`, }), }; export const HeaderVariants: Story = { render: () => ({ template: /*html*/ `

Title only

Title with icon button suffix

`, }), }; export const HeaderEndSlotVariants: Story = { render: () => ({ template: /*html*/ `

Title with end slot text

13

Title with end slot icon button

`, }), }; export const HeaderWithPadding: Story = { render: () => ({ template: /*html*/ `

Card as immediate sibling

bit-section-header has padding

Card nested in immediate sibling

bit-section-header has padding

Item as immediate sibling

bit-section-header has padding

Item nested in immediate sibling

bit-section-header has padding
`, }), }; export const HeaderWithoutPadding: Story = { render: () => ({ template: /*html*/ `

No card or item used

just a div, so bit-section-header has no padding

Card nested in non-immediate sibling

a div here

bit-section-header has no padding

`, }), };