Skip to content

Commit

Permalink
size tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusps committed Nov 17, 2019
1 parent 21887f8 commit 077b23d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/tokenSystem/size.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { createTokens } from 'styled-tokens'

const draftSizes = {
values: {
none: '0rem',
xs: '1rem',
sm: '2rem',
md: '4rem',
lg: '16rem',
xl: '32rem',
xxl: '64rem',
xxxl: '128rem',
10: '10%',
20: '20%',
30: '30%',
40: '40%',
50: '50%',
60: '60%',
70: '70%',
80: '80%',
90: '90%',
100: '100%',
auto: 'auto',
},
propName: {
width: 'w',
height: 'h',
maxWidth: 'maw',
minWidth: 'miw',
maxHeight: 'mah',
minHeight: 'mih',
},
}

type size = keyof typeof draftSizes.values

export type SizeSystem = Partial<{
w: size
h: size
maw: size
miw: size
mah: size
mih: size
}>

export default createTokens(draftSizes)

0 comments on commit 077b23d

Please sign in to comment.