Skip to content

Commit 4fc5f75

Browse files
committed
Add new space sizes
1 parent 11e0d2e commit 4fc5f75

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import styled, { css } from '../style/styled';
2-
import { mobile } from '../style/media';
3-
import { SpaceSizes } from '../style/theme';
1+
import { styled, css } from '../../styles';
2+
import { mobile } from '../../styles/mobile';
3+
import { SpaceSizes } from '../../styles/theme/index';
44

55
type Props = {
66
width?: SpaceSizes;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { styled } from '../../styles';
22
import {
3-
space,
43
color,
54
width,
65
height,
@@ -46,7 +45,6 @@ export const Box = styled('div')<BoxProps>(
4645
{
4746
boxSizing: 'border-box',
4847
},
49-
space,
5048
width,
5149
fontSize,
5250
color,

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

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,6 @@ 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-
],
129-
130117
// Font
131118
fontSizes: [12, 14, 16, 20, 28, 32, 48, 64],
132119
fontWeights: [300, 400, 600, 700],
@@ -141,3 +128,24 @@ export const theme: ThemeInterface = {
141128
...sizes,
142129
...zIndex,
143130
};
131+
132+
export type SpaceSizes =
133+
| 0
134+
| 4
135+
| 8
136+
| 12
137+
| 16
138+
| 21
139+
| 24
140+
| 32
141+
| 40
142+
| 48
143+
| 56
144+
| 64
145+
| 72
146+
| 80
147+
| 96
148+
| 100
149+
| 116
150+
| 132
151+
| 144;

0 commit comments

Comments
 (0)