diff --git a/web/DeviceToggle.tsx b/web/DeviceToggle.tsx index fe4fdef..24bc0e7 100644 --- a/web/DeviceToggle.tsx +++ b/web/DeviceToggle.tsx @@ -2,7 +2,7 @@ import { Monitor, Smartphone, Tablet } from 'lucide-react'; import { useCallback } from 'react'; import { useSearchParams } from 'react-router'; import { Button } from '@/components/ui/button'; -import type { DeviceName } from './ViewMode'; +import { DEVICES, type DeviceName } from './ViewMode'; /** * Which width everything is showing, and the control for changing it. @@ -44,35 +44,39 @@ const OPTIONS: { value: DeviceName; Icon: typeof Monitor }[] = [ ]; /** - * The control itself, for an editor section that has per-view settings. + * The control itself: three tabs across the width of whatever holds it. * - * `size` because the one in the panel's bar is chrome and these are part of a form: the bar's is as - * small as a bar allows, and a section's sits above its own fields and should read as belonging to - * them. + * ── One shape, not two ── + * + * There was a `size` prop. `bar` was a small icon-only cluster for the panel bar across the top of the + * detail panel, and that bar is gone — so what is left is the one shape, and a prop with a single + * value is a decision nobody makes. + * + * ── Labelled, and spread ── + * + * The icons alone were a rebus: a rectangle, a slightly narrower rectangle, and a narrower one still, + * telling three things apart by proportion at 12 pixels. They read as tabs now because they behave + * like tabs — one of three, the whole width, the chosen one filled — and the word is what makes the + * choice legible without hovering for a tooltip. + * + * The label comes from DEVICES, which is also what the preview names in its own caption. One list. */ -export const DeviceToggle = ({ size = 'bar' }: { size?: 'bar' | 'section' }) => { +export const DeviceToggle = () => { const [device, setDevice] = useDevice(); - const compact = size === 'bar'; return ( -