Skip to content

Commit 7227a7b

Browse files
committed
add margin and padding space prop
1 parent 4fc5f75 commit 7227a7b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/gatsby-theme/src/components/shared/base.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { styled } from '../../styles';
22
import {
3+
space,
34
color,
45
width,
56
height,
@@ -45,6 +46,7 @@ export const Box = styled('div')<BoxProps>(
4546
{
4647
boxSizing: 'border-box',
4748
},
49+
space,
4850
width,
4951
fontSize,
5052
color,

packages/gatsby-theme/src/styles/theme/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ export const sizes: Sizes = {
114114
// [C] Nav
115115
navHeight: 64,
116116
brandHeight: 40,
117+
// Spaces
118+
space: [
119+
// margin and padding
120+
0,
121+
4,
122+
8,
123+
16,
124+
32,
125+
64,
126+
128,
127+
256,
128+
],
117129
// Font
118130
fontSizes: [12, 14, 16, 20, 28, 32, 48, 64],
119131
fontWeights: [300, 400, 600, 700],

0 commit comments

Comments
 (0)