Files
TREK/client/src/components/Planner/AddRouteStop.tsx
T

30 lines
839 B
TypeScript

import { Plus } from 'lucide-react';
export function AddRouteStop({
onClick,
label,
mobile = false,
}: {
onClick: () => void;
label: string;
mobile?: boolean;
}) {
const button = mobile
? 'border-m-rowbr bg-m-sheetop text-control text-m-ink active:bg-m-ic'
: 'border-edge bg-surface-input text-body text-content hover:bg-surface-hover';
const tile = mobile ? 'bg-m-ic text-m-muted' : 'bg-surface-secondary text-content-muted';
return (
<button
type="button"
onClick={onClick}
className={`flex min-h-11 w-full items-center gap-2 rounded-xl border px-3 py-1.5 text-start font-medium ${button}`}
>
<span className={`grid size-7 shrink-0 place-items-center rounded-lg ${tile}`}>
<Plus size={16} strokeWidth={2} aria-hidden />
</span>
{label}
</button>
);
}