import type { Meta, StoryObj } from "@storybook/react-vite"; import { SettingsRow } from "@shared/components/SettingsRow"; import { ToggleSwitch } from "@shared/components/ToggleSwitch"; import { Select } from "@shared/components/Select"; import { Card } from "@shared/components/Card"; const meta: Meta = { title: "Primitives/SettingsRow", component: SettingsRow, tags: ["autodocs"], parameters: { layout: "padded" }, decorators: [ (S) => (
), ], }; export default meta; type Story = StoryObj; export const Toggle: Story = { args: { label: "Auto-classify", control: {}} size="sm" />, }, }; export const WithDescription: Story = { args: { label: "Detect PII", description: "Scan documents for sensitive fields on save", control: {}} size="sm" />, }, }; /** A settings list inside a padding-none Card. */ export const List: Story = { render: () => ( {[ { label: "Auto-classify", on: true }, { label: "Extract tables", on: true }, { label: "Strip blank pages", on: false }, ].map((r, i) => (
0 ? "1px solid var(--color-border)" : undefined, }} > {}} size="sm" /> } />
))}
), }; export const SelectControl: Story = { args: { label: "OCR level", control: (