Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/basecomponents/BaseCheckbox.vue

47 lines
901 B

<template>
<div class="field-checkbox">
<Checkbox
:model-value="modelValue"
:binary="true"
:name="name"
:input-id="id"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #icon="{checked}">
<BaseIcon
v-if="checked"
icon="confirm"
size="small"
class="bg-primary text-white rounded"
/>
</template>
</Checkbox>
<label :for="id" class="ml-2 cursor-pointer">{{ label }}</label>
</div>
</template>
<script setup>
import Checkbox from "primevue/checkbox";
import BaseIcon from "./BaseIcon.vue";
defineProps({
id: {
type: String,
required: true,
},
modelValue: {
type: null,
required: true,
},
name: {
type: String,
required: true,
},
label: {
type: String,
required: true
}
})
defineEmits(['update:modelValue'])
</script>