import type { Meta, StoryObj } from '@storybook/nextjs-vite'; import { InfoHint } from '../components/ui/info-hint'; const meta = { title: 'UI/InfoHint', component: InfoHint, argTypes: { side: { control: 'select', options: ['top', 'right', 'bottom', 'left'], }, }, parameters: { layout: 'centered', }, } satisfies Meta; export default meta; type Story = StoryObj; /** * The "what does this mean?" affordance — hover the ⓘ to reveal the * definition. The same text is exposed to assistive tech via * `aria-describedby`, so keyboard users are not left out by the hover-only * tooltip. */ export const Default: Story = { args: { label: 'Judged rules', side: 'top', children: 'Judged rules are evaluated by an LLM against the diff; deterministic rules run as code.', }, render: args => (
Judged rules
), }; /** * Inline in a row of labels — the `icon-inline` Button variant keeps the * target small enough to sit beside a badge without swamping it. */ export const InALabelRow: Story = { args: { children: 'Placeholder', }, render: () => (
Observe Runs the rule and records the outcome without blocking the PR. Error A failing rule blocks the merge until the finding is resolved or waived.
), };