import type { ReactNode } from 'react'; import { cn } from '@/lib/utils'; import { Label } from '@/components/ui/label'; interface FieldRowProps { label?: ReactNode; /** ID of the control the label names. */ htmlFor?: string; help?: ReactNode; id?: string; /** Dims the row and blocks pointer input (e.g. while its feature is off). */ disabled?: boolean; className?: string; children?: ReactNode; } /** * One settings row: label on the left, control and help text on the right * (stacked on narrow screens). The successor of a form-table . */ export default function FieldRow( { label, htmlFor, help, id, disabled = false, className, children }: FieldRowProps ) { return (
{ label && htmlFor ? : label }
{ children } { help &&

{ help }

}
); }