Skip to content

Commit d0fdce2

Browse files
committed
style: Make Line interpolation label consistent
1 parent c4c2287 commit d0fdce2

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

‎packages/app/src/components/ChartDisplaySettingsDrawer.tsx‎

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
Divider,
2424
Drawer,
2525
Group,
26+
Input,
2627
NumberInput,
2728
SegmentedControl,
2829
Stack,
@@ -344,27 +345,28 @@ export default function ChartDisplaySettingsDrawer({
344345
description="Start the y-axis at the minimum of the displayed data instead of zero. Only applicable to line charts."
345346
/>
346347
{showLineInterpolation && (
347-
<Box>
348-
<Text size="xs" mb={4}>
349-
Line interpolation
350-
</Text>
348+
<Input.Wrapper size="xs" label="Line interpolation">
351349
<Controller
352350
control={control}
353351
name="lineInterpolation"
354352
render={({ field: { onChange, value } }) => (
355-
<SegmentedControl
356-
size="xs"
357-
value={value ?? defaultLineInterpolation}
358-
onChange={v => {
359-
const parsed = LineInterpolationSchema.safeParse(v);
360-
if (parsed.success) onChange(parsed.data);
361-
}}
362-
data={LINE_INTERPOLATION_OPTIONS}
363-
data-testid="line-interpolation-control"
364-
/>
353+
// Block wrapper so the inline-flex control sits below the
354+
// inline-block label.
355+
<Box>
356+
<SegmentedControl
357+
size="xs"
358+
value={value ?? defaultLineInterpolation}
359+
onChange={v => {
360+
const parsed = LineInterpolationSchema.safeParse(v);
361+
if (parsed.success) onChange(parsed.data);
362+
}}
363+
data={LINE_INTERPOLATION_OPTIONS}
364+
data-testid="line-interpolation-control"
365+
/>
366+
</Box>
365367
)}
366368
/>
367-
</Box>
369+
</Input.Wrapper>
368370
)}
369371
{showSeriesLimit && (
370372
<Box>

0 commit comments

Comments
 (0)