the device control spans the section

No label, full width, three across. It scopes the fields below it, so it reads as their header.
This commit is contained in:
2026-09-01 03:55:12 +01:00
parent 852c53dd09
commit 89380a69d6
2 changed files with 10 additions and 15 deletions
+2 -13
View File
@@ -360,19 +360,8 @@ export const LayoutPanel = () => {
<AccordionItem value="padding" className="rounded-lg border border-border px-4">
<AccordionTrigger className="text-xs">Spacing</AccordionTrigger>
<AccordionContent>
{/*
The view this section's settings are FOR, at the top of it.
Spacing is per width, so the section has to say which width it is editing — and the answer
is the same one the preview is showing, not a second selector that could disagree with it.
The control reads `?device=`, so pressing it here moves the preview, the bar's toggle and
this section together because all three are reading one value.
At the top rather than beside the fields: it scopes everything below it, and a control that
scopes a group belongs above the group.
*/}
<div className="mb-3 flex items-center gap-2">
<span className="text-xs text-muted-foreground">Editing</span>
{/* The width these settings are for. Reads `?device=`, so it moves the preview too. */}
<div className="mb-3">
<DeviceToggle size="section" />
</div>
{/*