feat: refs #7411 add VnCheckbox component with info support

This commit is contained in:
Jose Antonio Tubau 2025-01-28 08:30:38 +01:00
parent 01e726c6f7
commit a337bdf474
1 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<script setup>
import { computed } from 'vue';
const emit = defineEmits(['update:modelValue']);
const $props = defineProps({
modelValue: {
type: [Boolean],
default: null,
},
label: {
type: String,
default: null,
},
info: {
type: String,
default: null,
},
});
const isChecked = computed({
get: () => $props.modelValue,
set: (value) => emit('update:modelValue', value),
});
</script>
<template>
<div>
<QCheckbox
:label="$props.label"
v-model="isChecked"
/>
<QIcon v-if="$props.info" class="cursor-info q-ml-sm" name="info" size="sm">
<QTooltip>
{{ $props.info }}
</QTooltip>
</QIcon>
</div>
</template>