feat(frontend): F1 widgets (select/info/freetext) + reserved controls

This commit is contained in:
2026-06-28 12:25:50 +02:00
parent e9aca179d7
commit a267754f8f
7 changed files with 76 additions and 0 deletions
@@ -0,0 +1,7 @@
const LABELS: Record<string, string> = { back: "Torna indietro", exit: "Esci", other: "Altro — specifica" };
export function ReservedControls({ reserved, onControl }: { reserved?: string[]; onControl: (c: string) => void }) {
if (!reserved?.length) return null;
return <div className="flex gap-2 pt-2">{reserved.map((c) => (
<button key={c} className="text-sm border rounded px-2 py-1" onClick={() => onControl(c)}>{LABELS[c] ?? c}</button>
))}</div>;
}