feat(driver-pwa): shared UI + router with auth guard
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
interface Props { value: string; options: { value: string; label: string }[]; onChange: (v: string) => void; }
|
||||
export function Segment({ value, options, onChange }: Props) {
|
||||
return (
|
||||
<div className="flex gap-1.5">
|
||||
{options.map((o) => (
|
||||
<button
|
||||
key={o.value}
|
||||
type="button"
|
||||
onClick={() => onChange(o.value)}
|
||||
className={`flex-1 py-2.5 rounded-xl2 text-xs border ${
|
||||
value === o.value ? "bg-ink text-cream border-ink font-bold" : "bg-surface border-line text-muted"
|
||||
}`}
|
||||
>
|
||||
{o.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user