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,12 @@
|
||||
export function AppHeader({ initials }: { initials?: string }) {
|
||||
return (
|
||||
<header className="flex items-center justify-between mb-4">
|
||||
<span className="text-sm font-bold">Премиум Водитель</span>
|
||||
{initials && (
|
||||
<span className="w-7 h-7 rounded-full bg-ink text-cream text-[10px] font-bold flex items-center justify-center">
|
||||
{initials}
|
||||
</span>
|
||||
)}
|
||||
</header>
|
||||
);
|
||||
}
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export function Spinner() {
|
||||
return <span className="inline-block w-3.5 h-3.5 border-2 border-line border-t-ink rounded-full animate-spin" />;
|
||||
}
|
||||
Reference in New Issue
Block a user