import type { Decorator, Meta, StoryObj } from '@storybook/react-vite' import { IconEdit, IconSortDescending, IconX } from '@tabler/icons-react' import { ContainerHeader } from './ContainerHeader' import { IconButton } from './IconButton' import { MenuItem } from './Menu' import { Card } from './Card' // The top of a column: a surface with a hairline, so the bar's own hairline and height can be seen. const inColumn: Decorator = (Story) => {Story()} const meta = { title: 'Navigation/ContainerHeader', component: ContainerHeader, args: { title: 'Items' }, argTypes: { actions: { control: false } }, decorators: [inColumn], } satisfies Meta export default meta type Story = StoryObj /** A title that opens a menu: the title and its chevron are one button. Click it. */ export const WithTitleMenu: Story = { args: { title: 'View one', titleMenu: ( <> ), }, } /** A string title, one line, alone. */ export const Default: Story = {} /** A chevron after the title, for a title that opens something. */ export const WithChevron: Story = { args: { title: 'All items', chevron: true } } /** The column's own buttons at the right edge: IconButtons with tooltips. */ export const WithActions: Story = { args: { title: 'All items', chevron: true, actions: ( <> ), }, } /** A title that is not a string — a name over its caption — takes the room left and is drawn as given. */ export const WithRichTitle: Story = { // axe color-contrast is off here until PLAN.md stage 0.10 is ruled: the caption // is muted text, 3.94:1 in signal (AA 4.5:1) — as Peek's file page draws it. parameters: { a11y: { config: { rules: [{ id: 'color-contrast', enabled: false }] } } }, args: { title: (

Quarterly plan

In Project Alpha

), actions: ( ), }, }