Design system : fix spacings & add border parameters

wip-johan
Johan Girod 2021-10-14 17:16:48 +02:00 committed by Alexandre Valsamou-Stanislawski
parent 973bc91546
commit 495b74b2cb
2 changed files with 21 additions and 8 deletions

View File

@ -21,12 +21,13 @@ type SmallPalette = {
500: Color
600: Color
}
type Metric = string
type Spacing = string
type Spacing = Metric
type Font = string
type FontSize = string
type FontSize = Metric
declare module 'styled-components' {
export interface DefaultTheme {
@ -70,5 +71,11 @@ declare module 'styled-components' {
}
baseFontSize: FontSize
box: {
borderRadius: Metric
borderWidth: Metric
borderWidthLarge: Metric
}
}
}

View File

@ -129,12 +129,12 @@ export const theme: DefaultTheme = {
spacings: {
xxs: '.25rem',
xs: '.5rem',
sm: '1rem',
md: '1.5rem',
lg: '2rem',
xl: '3rem',
xxl: '4rem',
xxxl: '8rem',
sm: '0.75rem',
md: '1rem',
lg: '1.5rem',
xl: '2rem',
xxl: '2.5rem',
xxxl: '3.25rem',
},
fonts: {
@ -143,4 +143,10 @@ export const theme: DefaultTheme = {
},
baseFontSize: '16px',
box: {
borderRadius: '6px',
borderWidth: '1px',
borderWidthLarge: '2px',
},
}