Skip to content

Commit

Permalink
chore(web): fix WAS gap
Browse files Browse the repository at this point in the history
  • Loading branch information
KaWaite committed Nov 20, 2023
1 parent f9a7d49 commit b80a31d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/src/beta/features/Editor/Visualizer/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ export const convertWidgets = (
left: padding?.left ?? 6,
right: padding?.right ?? 6,
},
gap: area?.gap ?? 6,
widgets: areaWidgets,
background: area?.background as string | undefined,
centered: area?.centered,
gap: area?.gap ?? undefined,
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ContainerSettings: React.FC<Props> = ({ widgetArea, onWidgetAreaStateChang

<TextInput
name={t("Gap spacing")}
value={(widgetArea?.gap ?? 0).toString()}
value={(widgetArea?.gap ?? 6).toString()}
onChange={newVal => {
onWidgetAreaStateChange({
...widgetArea,
Expand Down
2 changes: 1 addition & 1 deletion web/src/beta/features/PublishedVisualizer/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export default (alias?: string) => {
left: padding?.left ?? 6,
right: padding?.right ?? 6,
},
gap: area?.gap ?? 6,
widgets: areaWidgets || [],
background: area?.background as string | undefined,
centered: area?.centered,
gap: area?.gap ?? undefined,
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function Area({
zone,
background: backgroundColor,
centered,
gap,
gap: gap ?? 6,
padding: {
top: padding?.top ?? 6,
bottom: padding?.bottom ?? 6,
Expand Down
4 changes: 2 additions & 2 deletions web/src/beta/lib/core/StoryPanel/Page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ const StoryPanel: React.FC<Props> = ({
<Wrapper
id={page?.id}
ref={containerRef}
padding={panelSettings.padding.value}
gap={panelSettings.gap.value}>
padding={panelSettings?.padding?.value}
gap={panelSettings?.gap?.value}>
{(isEditable || title?.title?.value) && (
<StoryBlock
block={{
Expand Down
6 changes: 3 additions & 3 deletions web/src/classic/core/Crust/Widgets/WidgetAlignSystem/Area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Props = {
align?: Alignment;
padding?: WidgetAreaPadding;
backgroundColor?: string;
gap?: number | null;
gap?: number;
centered?: boolean;
built?: boolean;
widgets?: InternalWidget[];
Expand Down Expand Up @@ -112,7 +112,7 @@ export default function Area({
? `${padding?.top}px ${padding?.right}px ${padding?.bottom}px ${padding?.left}px`
: "0",
backgroundColor: backgroundColor,
gap: gap ?? 0,
gap: gap ?? 6,
alignItems: centered ? "center" : "unset",
borderRadius: 0,
transition: built ? "none" : undefined,
Expand All @@ -132,7 +132,7 @@ export default function Area({
: area === "middle"
? `1px solid ${theme.classic.alignSystem.blueHighlight}`
: `1px solid ${theme.classic.alignSystem.orangeHighlight}`,
gap: gap ?? 0,
gap: gap ?? 6,
alignItems: centered ? "center" : "unset",
}}
iconColor={area === "middle" ? "#4770FF" : "#E95518"}>
Expand Down

0 comments on commit b80a31d

Please sign in to comment.