File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/anu-vue/src/components/checkbox Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ const props = defineProps({
25
25
*/
26
26
icon: defu ({ default: ' i-bx-check' }, configurableProp ),
27
27
28
+ /**
29
+ * Bind classes to input element
30
+ */
31
+ inputClasses: { type: null },
32
+
28
33
/**
29
34
* Disable checkbox
30
35
*/
@@ -42,6 +47,7 @@ const emit = defineEmits<{
42
47
43
48
defineOptions ({
44
49
name: ' ACheckbox' ,
50
+ inheritAttrs: false ,
45
51
})
46
52
47
53
const attrs = useAttrs ()
@@ -75,15 +81,18 @@ const state = computed(() => {
75
81
<label
76
82
:for =" elementId"
77
83
class =" inline-flex items-center cursor-pointer"
78
- :class =" [props.disabled && 'a-checkbox-disabled pointer-events-none']"
84
+ :class =" [
85
+ $attrs.class,
86
+ props.disabled && 'a-checkbox-disabled pointer-events-none',
87
+ ]"
79
88
>
80
89
<input
90
+ v-bind =" { ...$attrs, class: props.inputClasses }"
81
91
:id =" elementId"
82
92
:ref =" refCheckbox"
83
93
v-model =" data"
84
94
class =" hidden"
85
95
type =" checkbox"
86
- v-bind =" attrs"
87
96
>
88
97
<div
89
98
class =" a-checkbox-box flex items-center justify-center shrink-0"
You can’t perform that action at this time.
0 commit comments