Skip to content

Commit 672e61d

Browse files
committed
refactor: Rename prop values
1 parent 33e8a05 commit 672e61d

6 files changed

Lines changed: 10 additions & 14 deletions

File tree

app/configurator/components/chart-controls/section.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,8 @@ export const ControlSection = forwardRef<
159159

160160
type ControlSectionContentProps = {
161161
children: ReactNode;
162-
px?: "default" | "none";
163-
// large for specific purposes, e.g. base layer map options
164-
// default for right panel options
165-
// none for left panel options
166-
gap?: "large" | "default" | "none";
162+
px?: "md" | "none";
163+
gap?: "lg" | "md" | "none";
167164
} & Omit<BoxProps, "children">;
168165

169166
const useControlSectionContentStyles = makeStyles<
@@ -173,8 +170,7 @@ const useControlSectionContentStyles = makeStyles<
173170
controlSectionContent: {
174171
display: "flex",
175172
flexDirection: "column",
176-
gap: ({ gap }) =>
177-
theme.spacing(gap === "large" ? 3 : gap === "default" ? 2 : 0),
173+
gap: ({ gap }) => theme.spacing(gap === "lg" ? 3 : gap === "md" ? 2 : 0),
178174
minWidth: 0,
179175
paddingLeft: ({ px }) => (px === "none" ? 0 : theme.spacing(4)),
180176
paddingTop: theme.spacing(2),
@@ -187,8 +183,8 @@ export const ControlSectionContent = ({
187183
component = "div",
188184
role,
189185
children,
190-
px = "default",
191-
gap = "default",
186+
px = "md",
187+
gap = "md",
192188
sx,
193189
...props
194190
}: ControlSectionContentProps) => {

app/configurator/components/chart-options-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ const EncodingOptionsPanel = ({
391391
<SectionTitle closable>
392392
{getFieldLabel(`${chartConfig.chartType}.${encoding.field}`)}
393393
</SectionTitle>
394-
<ControlSectionContent gap="large">
394+
<ControlSectionContent gap="lg">
395395
{!encoding.customComponent && (
396396
<ChartFieldField
397397
field={encoding.field}

app/configurator/components/chart-options-selector/base-layer-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const BaseLayerField = ({ chartConfig }: { chartConfig: MapConfig }) => {
6060
<SectionTitle closable>
6161
<Trans id="chart.map.layers.base">Base map</Trans>
6262
</SectionTitle>
63-
<ControlSectionContent gap="large">
63+
<ControlSectionContent gap="lg">
6464
<ChartOptionCheckboxField
6565
label={t({
6666
id: "chart.map.layers.base.show",

app/configurator/components/chart-options-selector/conversion-units-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ const ConversionUnitSection = ({
419419
<SectionTitle iconName="balance">
420420
<Trans id="controls.convert-unit">Unit Conversion</Trans>
421421
</SectionTitle>
422-
<ControlSectionContent gap="large">
422+
<ControlSectionContent gap="lg">
423423
<Checkbox
424424
label={t({
425425
id: "controls.convert-unit.enable",

app/configurator/components/chart-options-selector/layout-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const LayoutField = ({
7373
<SectionTitle iconName="swatch">
7474
<Trans id="controls.section.layout-options">Layout options</Trans>
7575
</SectionTitle>
76-
<ControlSectionContent gap="large">
76+
<ControlSectionContent gap="lg">
7777
{hasSubType && (
7878
<ChartSubType
7979
encoding={encoding}

app/configurator/components/custom-layers-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export const CustomLayersSelector = () => {
220220
) : null}
221221
</Box>
222222
</LeftDrawer>
223-
<ControlSectionContent gap="large">
223+
<ControlSectionContent gap="lg">
224224
{configLayers.length === 0 && (
225225
<Typography variant="body3" color="text.secondary">
226226
<Trans id="chart.map.layers.no-layers">No imported maps</Trans>

0 commit comments

Comments
 (0)