mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +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)
|