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:
@@ -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>
|
||||
{/*
|
||||
|
||||
Reference in New Issue
Block a user