import { NormalSizes } from '../utils/prop-types' import { HuiThemes } from '../themes' export interface SelectSize { height: string fontSize: string minWidth: string } export const getSizes = (theme: HuiThemes, size?: NormalSizes): SelectSize => { const sizes: { [key in NormalSizes]: SelectSize } = { medium: { height: `calc(2 * ${theme.layout.gap})`, fontSize: '.875rem', minWidth: '10rem' }, small: { height: `calc(1.5 * ${theme.layout.gap})`, fontSize: '.75rem', minWidth: '8rem' }, mini: { height: `calc(1 * ${theme.layout.gap})`, fontSize: '.75rem', minWidth: '6.5rem' }, large: { height: `calc(2.25 * ${theme.layout.gap})`, fontSize: '1.225rem', minWidth: '12.5rem' } } return size ? sizes[size] : sizes.medium }