import type { Meta, StoryObj } from '@storybook/react-vite' import { InlineChip } from './InlineChip' import { KindIcon, type ThingKind } from './KindIcon' import { MenuItem, MenuPanel, MenuSection } from './Menu' const meta = { title: 'Primitives/KindIcon', component: KindIcon, args: { kind: 'topic' }, argTypes: { kind: { control: 'select', options: ['topic', 'project', 'issue', 'file', 'message'] } }, } satisfies Meta export default meta type Story = StoryObj const KINDS: { kind: ThingKind; name: string }[] = [ { kind: 'topic', name: 'Topic' }, { kind: 'project', name: 'Project' }, { kind: 'issue', name: 'Issue' }, { kind: 'file', name: 'Another app’s file' }, { kind: 'message', name: 'Message' }, ] export const Default: Story = {} /** Every kind, at 16px, beside its name. */ export const EveryKind: Story = { parameters: { controls: { disable: true } }, render: () => (
{KINDS.map(({ kind, name }) => (
{name}
))}
), } /** At 14px inside a chip, the way a sentence names a thing. */ export const InAChip: Story = { parameters: { controls: { disable: true } }, render: () => (

Tracked in }>Ship the block model and{' '} }>Planning for now.

), } /** At the start of list rows, each saying what it points at. */ export const InAList: Story = { parameters: { controls: { disable: true } }, render: () => ( {KINDS.map(({ kind, name }) => ( } onClick={() => {}} /> ))} ), }