Skip to content

Commit 7364bb5

Browse files
committed
fix(afcl): support disabled props for checkbox
1 parent 0c92a72 commit 7364bb5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adminforth/spa/src/afcl/Checkbox.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<template>
2-
<div class="flex items-center h-5">
2+
<div class="flex items-center h-5" :class="{'opacity-50' : props.disabled}">
33
<input :id="id"
44
ref="rememberInput"
55
type="checkbox"
66
:checked="props.modelValue"
7+
:disabled="props.disabled"
78
@change="$emit('update:modelValue', $event.target.checked)"
89
class="w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-lightPrimary cursor-pointer
910
focus:ring-opacity-50 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 checked:bg-lightPrimary checked:dark:bg-darkPrimary" />
@@ -17,6 +18,7 @@
1718
1819
const props = defineProps({
1920
modelValue: Boolean,
21+
disabled: Boolean,
2022
});
2123
2224
defineEmits(['update:modelValue']);

0 commit comments

Comments
 (0)