Skip to content
This repository was archived by the owner on Mar 14, 2021. It is now read-only.

Commit f175059

Browse files
Andrey Okonetchnikovokonet
authored andcommitted
fix: Set correct width in the SpacingSwatch.
Fixes width being bigger than 0 if value is 0
1 parent 4119606 commit f175059

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/SpacingSwatch.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ const SpacingSwatch = ({ value, css: componentCSS, ...rest }) => {
88
return (
99
<div
1010
sx={{
11-
p: 2,
11+
py: 2,
1212
color: "secondary",
1313
bg: "muted",
1414
width: value,
1515
...componentCSS
1616
}}
1717
{...rest}
1818
>
19-
<SwatchValue color="inherit">{value}</SwatchValue>
19+
<SwatchValue color="inherit" sx={{ mx: 2 }}>
20+
{value}
21+
</SwatchValue>
2022
</div>
2123
);
2224
};

0 commit comments

Comments
 (0)