Skip to content

Commit 36743d6

Browse files
author
Jakub Holak
committed
Fix box spacing
1 parent a666578 commit 36743d6

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nordcloud/gnui",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"repository": "git://github.com/nordcloud/gnui.git",

src/components/box/Box.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,27 @@ type BoxProps = {
1111
color?: string;
1212
backgroundColor?: string;
1313
radius?: "small" | "medium" | "large";
14-
padding?: "spacing01" | "spacing02" | "spacing03" | "spacing04" | "spacing05" | "spacing06" | "spacing07" | "spacing08";
15-
spacing?: "spacing01" | "spacing02" | "spacing03" | "spacing04" | "spacing05" | "spacing06" | "spacing07" | "spacing08";
14+
padding?:
15+
| "spacing01"
16+
| "spacing02"
17+
| "spacing03"
18+
| "spacing04"
19+
| "spacing05"
20+
| "spacing06"
21+
| "spacing07"
22+
| "spacing08";
23+
spacing?:
24+
| "spacing01"
25+
| "spacing02"
26+
| "spacing03"
27+
| "spacing04"
28+
| "spacing05"
29+
| "spacing06"
30+
| "spacing07"
31+
| "spacing08";
32+
1633
shadow?: "shadow01" | "shadow02" | "shadow03" | "shadow04";
34+
1735
children?: React.ReactNode;
1836
};
1937

@@ -44,6 +62,11 @@ const StyledBox = styled(Container)<BoxProps>`
4462
css`
4563
padding: ${theme.spacing[padding]};
4664
`}
65+
${({ spacing }) =>
66+
spacing &&
67+
css`
68+
margin: ${theme.spacing[spacing]};
69+
`}
4770
${({ shadow }) =>
4871
shadow &&
4972
css`

0 commit comments

Comments
 (0)