UNPKG

@indielayer/ui

Version:

Indielayer UI Components with Tailwind CSS build for Vue 3

22 lines (16 loc) 433 B
import type { PropType } from 'vue' export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' export const useCommon = () => {} const validators = Object.freeze({ size: ['xs', 'sm', 'md', 'lg', 'xl'], }) useCommon.props = () => ({ size: { type: String as PropType<Size>, default: 'md', validator: (value: string) => validators.size.includes(value), }, } as const) useCommon.validators = () => ({ ...validators, })