bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
1 lines • 633 B
Source Map (JSON)
{"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;AACb,QAAM,gBAAgB,QAAQ,KAAK;AAEnC,SAAO,kBAAkB,OAAO,aAAa,kBAAkB,QAAQ,eAAe;AACxF,CAAC;"}