File tree Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" afcl-checkbox flex items-center h-5" :class =" {'opacity-50' : props.disabled}" >
3
- <input :id =" id"
4
- ref =" rememberInput"
5
- type =" checkbox"
6
- :checked =" props.modelValue"
7
- :disabled =" props.disabled"
8
- @change =" $emit('update:modelValue', $event.target.checked)"
9
- class =" w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-lightPrimary cursor-pointer
10
- 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" />
2
+ <div class =" afcl-checkbox flex items-center relative h-5" :class =" {'opacity-50' : props.disabled}" >
3
+ <div class =" flex items-center justify-center" >
4
+ <input :id =" id"
5
+ ref =" rememberInput"
6
+ type =" checkbox"
7
+ :checked =" props.modelValue"
8
+ :disabled =" props.disabled"
9
+ @change =" $emit('update:modelValue', $event.target.checked)"
10
+ class =" peer appearance-none min-w-4 min-h-4 bg-lightCheckboxBgUnchecked border border-lightCheckboxBorderColor rounded-sm checked:bg-lightCheckboxBgChecked
11
+ focus:ring-lightFocusRing dark:focus:ring-darkFocusRing dark:focus:ring-darkFocusRing
12
+ focus:ring-2 dark:bg-darkCheckboxBgUnchecked dark:border-darkCheckboxBorderColor dark:checked:bg-darkCheckboxBgChecked cursor-pointer"
13
+ >
14
+ <div class =" pointer-events-none absolute text-lightCheckboxIconColor dark:text-darkCheckboxIconColor leading-none peer-checked:block hidden" >
15
+ <IconCheckOutline width =" 18" height =" 18" />
16
+ </div >
17
+ </div >
18
+ <label :for =" id" class =" ms-2 text-sm font-medium text-lightTextLabel dark:text-darkTextLabel" >
19
+ <slot ></slot >
20
+ </label >
21
+
11
22
</div >
12
- <label :for =" id" class =" ms-2 text-sm font-medium text-gray-900 dark:text-gray-300" >
13
- <slot ></slot >
14
- </label >
15
23
</template >
16
24
17
25
<script setup lang="ts">
18
-
26
+ import { IconCheckOutline } from ' @iconify-prerendered/vue-flowbite ' ;
19
27
const props = defineProps ({
20
28
modelValue: Boolean ,
21
29
disabled: Boolean ,
You can’t perform that action at this time.
0 commit comments