mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-15 20:44:07 +00:00
Creating util Size class
This commit is contained in:
parent
df4c7439df
commit
f7c0a13ee2
21
src/theme/size.js
Normal file
21
src/theme/size.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// @flow
|
||||||
|
import { xs, sm, md, lg, xl } from '~/theme/variables'
|
||||||
|
|
||||||
|
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
||||||
|
|
||||||
|
export const getSize = (size: Size) => {
|
||||||
|
switch (size) {
|
||||||
|
case 'xs':
|
||||||
|
return xs
|
||||||
|
case 'sm':
|
||||||
|
return sm
|
||||||
|
case 'md':
|
||||||
|
return md
|
||||||
|
case 'lg':
|
||||||
|
return lg
|
||||||
|
case 'xl':
|
||||||
|
return xl
|
||||||
|
default:
|
||||||
|
return md
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user