import type { ReactNode } from 'react'; import { cn } from '@/lib/utils'; export type SettingsFieldTone = 'default' | 'warn' | 'error' | 'success'; interface SettingsFieldProps { label: ReactNode; helper?: ReactNode; tone?: SettingsFieldTone; htmlFor?: string; children: ReactNode; align?: 'center' | 'start'; className?: string; } const helperToneClass: Record = { default: 'text-stat-subtitle', warn: 'text-warning', error: 'text-destructive', success: 'text-success', }; /** * Two-column field row matching the audit's set-a-row pattern: label + mono helper on * the left, control on the right. Replaces the stacked label-then-input-then-paragraph * shadcn default. Use inside a . */ export function SettingsField({ label, helper, tone = 'default', htmlFor, children, align = 'center', className, }: SettingsFieldProps) { return (
{helper ? (

{helper}

) : null}
{children}
); }