Spacing says which width it is for
Every field in there writes one breakpoint, chosen by the tabs at the top of the panel. Without the name the same six selects mean six different things depending on something above them. One span, not two: the trigger is justify-between and puts the chevron last. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { useClient } from 'hooks/useClient';
|
||||
import { readableError } from '../errors';
|
||||
import { useFlash } from '../useFlash';
|
||||
import { useAutosave } from '../useAutosave';
|
||||
import { usePreviewable, useViewMode } from '../ViewMode';
|
||||
import { DEVICES, usePreviewable, useViewMode } from '../ViewMode';
|
||||
import { applySpacing, paintMeasure, type SpacingDraft } from '../canvas';
|
||||
import { SitePreview, useDevPort } from '../SitePreview';
|
||||
import { useEditorSlot } from '../useEditorSlot';
|
||||
@@ -347,7 +347,15 @@ export const LayoutPanel = () => {
|
||||
</AccordionContent>
|
||||
</AccordionItem>
|
||||
<AccordionItem value="padding" className="rounded-lg border border-border px-4">
|
||||
<AccordionTrigger className={SECTION_TITLE}>Spacing</AccordionTrigger>
|
||||
<AccordionTrigger className={SECTION_TITLE}>
|
||||
{/*
|
||||
ONE child, because the trigger is `justify-between` and puts the chevron last — two would
|
||||
spread the title and the width apart with the arrow beyond them.
|
||||
*/}
|
||||
<span>
|
||||
Spacing <span className="font-normal text-muted-foreground">({DEVICES[device].label})</span>
|
||||
</span>
|
||||
</AccordionTrigger>
|
||||
<AccordionContent>
|
||||
{/* Three bands. PaddingTab is still the per-SECTION control, for the pages. */}
|
||||
<SpacingTab
|
||||
|
||||
Reference in New Issue
Block a user