import { useState } from 'react' import type { Meta, StoryObj } from '@storybook/react-vite' import { Chip } from './Chip' import { Person } from './Person' import { Property } from './Property' import { Select } from './Select' /** A labelled property — the 68px label column is what lines the values up. */ const meta = { title: 'Primitives/Property', component: Property, decorators: [(Story) =>
], args: { label: 'Status', children: }, argTypes: { children: { control: false } }, } satisfies Meta export default meta type Story = StoryObj export const Row: Story = {} /** A column of rows — the label column keeps the values aligned. */ export const APanel: Story = { parameters: { controls: { disable: true } }, render: () => (
2d ago
), } /** Ship's rail layout: the 9px uppercase label above a full-width value. */ export const Stacked: Story = { args: { label: 'Assignee', layout: 'stacked', children:
, }, } function ControlsDemo() { const [status, setStatus] = useState('doing') const [owner, setOwner] = useState('ana') return (
) } /** The property holding a control — a full-width Select under a stacked label (the rail), a small one in a row. */ export const WithControls: Story = { parameters: { controls: { disable: true } }, render: () => , } /** No value: the em dash, muted — the same mark Person uses for the unnamed. */ export const Empty: Story = { args: { label: 'Folder', children: — }, }