import { useId, useState } from "react"; import { Icon } from "~/ui/Icon"; import { cn } from "~/utils/cn"; /** * An (i) toggle that reveals an explanation inline, below its row. Inline rather than floating so it is never * clipped by a Panel and works the same on touch screens. */ export function InfoTip({ label, children, className, }: { label: string; children: React.ReactNode; className?: string; }) { const [open, setOpen] = useState(false); const id = useId(); return ( <> {open && (
{children}
)} ); }