Skip to content

Commit f46e28a

Browse files
committed
chore: add custom label on sandbox
1 parent bed4f89 commit f46e28a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/sandbox/src/components/PreviewDimension.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export const PreviewDimension: FunctionComponent<{
1313
}> = (props) => {
1414
const { previewDimension } = props
1515

16+
let customLabel = 'Custom'
17+
if (previewDimension.tag === 'custom') {
18+
customLabel += ` (${previewDimension.width})`
19+
}
20+
1621
return (
1722
<FormControl disabled>
1823
<FormLabel id="demo-radio-buttons-group-label">
@@ -41,7 +46,7 @@ export const PreviewDimension: FunctionComponent<{
4146
<FormControlLabel
4247
value="custom"
4348
control={<Radio />}
44-
label="Custom"
49+
label={customLabel}
4550
/>
4651
</RadioGroup>
4752
</FormControl>

0 commit comments

Comments
 (0)