UNPKG

@coreui/vue-pro

Version:

UI Components Library for Vue.js

95 lines (91 loc) 1.93 kB
export const Shape = { type: String, validator: (value: string): boolean => { // The value must match one of these strings return [ 'rounded', 'rounded-top', 'rounded-end', 'rounded-bottom', 'rounded-start', 'rounded-circle', 'rounded-pill', 'rounded-0', 'rounded-1', 'rounded-2', 'rounded-3', ].includes(value) }, } export const Align = { type: String, validator: (value: string): boolean => { // The value must match one of these strings return ['', 'left', 'center', 'right'].includes(value) }, } export const Color = { type: String, validator: (value: string): boolean => { // The value must match one of these strings return [ 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'link', 'transparent', 'primary-gradient', 'secondary-gradient', 'success-gradient', 'danger-gradient', 'warning-gradient', 'info-gradient', 'dark-gradient', 'light-gradient', ].includes(value) }, } export const TextColor = { type: String, validator: (value: string): boolean => { return [ 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'primary-emphasis', 'secondary-emphasis', 'success-emphasis', 'danger-emphasis', 'warning-emphasis', 'info-emphasis', 'light-emphasis', 'body', 'body-emphasis', 'body-secondary', 'body-tertiary', 'black', 'black-50', 'white', 'white-50', ].includes(value) }, } export const Breakpoint = { validator: (value: boolean | number): boolean => { if (typeof value == 'boolean' || typeof value == 'number') { return true } else { return false } }, }