element-plus/packages/constants/size.ts
bqy_fe 2f38edd715
fix(components): [select] inner input height is inconsistent with select (#6979)
* fix(components): [select] inner input height is inconsistent with select

* Update packages/constants/size.ts

Co-authored-by: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com>

Co-authored-by: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com>
2022-04-10 14:48:01 +08:00

14 lines
338 B
TypeScript

export const componentSizes = ['', 'default', 'small', 'large'] as const
export type ComponentSize = typeof componentSizes[number]
export const componentSizeMap = {
large: 40,
default: 32,
small: 24,
} as const
export const getComponentSize = (size: ComponentSize = 'default') => {
return componentSizeMap[size || 'default']
}