yunohost-admin/app/src/components/globals/formItems/CheckboxItem.vue
2024-03-27 00:43:51 +01:00

24 lines
568 B
Vue

<template>
<BFormCheckbox
:modelValue="modelValue"
@update:modelValue="$emit('update:modelValue', $event)"
:id="id"
:aria-describedby="$parent.id + '__BV_description_'"
switch
>
{{ label || $t(labels[modelValue]) }}
</BFormCheckbox>
</template>
<script>
export default {
name: 'CheckboxItem',
props: {
modelValue: { type: Boolean, required: true },
id: { type: String, default: null },
label: { type: String, default: null },
labels: { type: Object, default: () => ({ true: 'yes', false: 'no' }) },
},
}
</script>