element-plus/packages/utils/validators.ts
jeremywu ef92b6c11c
### feat: add dialog (#197)
* Add overlay component; Dialog component almost done

* feat(dialog): add use-lockscreen

* feat(dialog): coding completed awaiting tests

* feat(dialog): finish writing test cases

* fix test failures

* Address PR comments

* fallback some changes
2020-09-09 21:18:08 +08:00

5 lines
139 B
TypeScript

export const isValidWidthUnit = (val: string) =>
['px', 'rem', 'em', 'vw', '%', 'vmin', 'vmax'].some(unit =>
val.endsWith(unit),
)