mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
8 lines
250 B
TypeScript
8 lines
250 B
TypeScript
export const isValidWidthUnit = (val: string) =>
|
|
['px', 'rem', 'em', 'vw', '%', 'vmin', 'vmax'].some(unit =>
|
|
val.endsWith(unit),
|
|
)
|
|
|
|
export const isValidComponentSize = (val: string) =>
|
|
['', 'large', 'medium', 'small', 'mini'].includes(val)
|