From f7c0a13ee2014dbf78656ca562dce2a7e09c1c6f Mon Sep 17 00:00:00 2001 From: apanizo Date: Fri, 31 Aug 2018 12:22:38 +0200 Subject: [PATCH] Creating util Size class --- src/theme/size.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/theme/size.js diff --git a/src/theme/size.js b/src/theme/size.js new file mode 100644 index 00000000..13e11797 --- /dev/null +++ b/src/theme/size.js @@ -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 + } +}