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

51 lines
927 B

<template>
<div class="field-checkbox">
<Checkbox
:binary="true"
:input-id="id"
:model-value="modelValue"
:name="name"
@update:model-value="$emit('update:modelValue', $event)"
>
<template #icon="{ checked }">
<BaseIcon
v-if="checked"
class="bg-primary text-white rounded"
icon="confirm"
size="small"
/>
</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>