UNPKG

bootstrap-vue-next

Version:

BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.

1 lines 633 B
{"version":3,"file":"useStateClass-BGbSLWFN.mjs","sources":["../src/composables/useStateClass.ts"],"sourcesContent":["import {computed, type MaybeRefOrGetter, toValue} from 'vue'\nimport type {ValidationState} from '../types/CommonTypes'\n\nexport const useStateClass = (value: MaybeRefOrGetter<ValidationState>) =>\n computed(() => {\n const resolvedValue = toValue(value)\n\n return resolvedValue === true ? 'is-valid' : resolvedValue === false ? 'is-invalid' : null\n })\n"],"names":[],"mappings":";AAGO,MAAM,gBAAgB,CAAC,UAC5B,SAAS,MAAM;AACP,QAAA,gBAAgB,QAAQ,KAAK;AAEnC,SAAO,kBAAkB,OAAO,aAAa,kBAAkB,QAAQ,eAAe;AACxF,CAAC;"}