import type { Meta, StoryObj } from '@storybook/react-vite' import { useState } from 'react' import { PEOPLE, STATUS_OPTIONS } from './linked.examples' import { CommentCount, LinkPickers, ProgressRing, StatusMark } from './LinkParts' const meta = { title: 'Components/LinkParts', component: LinkPickers, parameters: { layout: 'padded' }, } satisfies Meta export default meta type Story = StoryObj /** A status and an owner, changed from the card. */ export const Pickers: Story = { render: () => { const [status, setStatus] = useState('todo') const [owner, setOwner] = useState(undefined) return ( ) }, } /** To a reader who may not change them, and in the hover preview: the same values, as words. */ export const PickersReadOnly: Story = { args: { status: { value: 'doing', options: STATUS_OPTIONS }, owner: { value: 'b', options: PEOPLE } }, } /** Nobody owns it yet, read only. */ export const NoOwner: Story = { args: { status: { value: 'todo', options: STATUS_OPTIONS }, owner: { value: undefined, options: PEOPLE } }, } /** The count of what was said, opening where it is read. With something unread, to a member: brighter, with a dot. */ export const Conversation: Story = { render: () => (
), } /** A status as its shape, and progress as a ring. */ export const Marks: Story = { render: () => (
{STATUS_OPTIONS.map((option) => ( ))}
), }