import { useState } from "react"; function Section({ title, children }: { title: string; children: React.ReactNode }) { return (

{title}

{children}
); } function RadioOption({ label, selected, onSelect, disabled = false, }: { label: string; selected: boolean; onSelect: () => void; disabled?: boolean; }) { return ( ); } const options = ["Economy", "Business", "First Class"] as const; export default function RadioDemo() { const [vertical, setVertical] = useState("Economy"); const [horizontal, setHorizontal] = useState("Economy"); return (
{options.map((opt) => ( setVertical(opt)} /> ))}
{options.map((opt) => ( setHorizontal(opt)} /> ))}
{}} disabled />
); }