bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
1 lines • 618 B
Source Map (JSON)
{"version":3,"file":"useStateClass-CdmlbrGn.mjs","names":[],"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"],"mappings":";;AAGA,IAAa,iBAAiB,UAC5B,eAAe;CACb,MAAM,gBAAgB,QAAQ,MAAM;AAEpC,QAAO,kBAAkB,OAAO,aAAa,kBAAkB,QAAQ,eAAe;EACtF"}