tabSize: 4

This commit is contained in:
2023-12-09 11:29:00 +01:00
parent 10c0387eb0
commit 2880dd7a03
54 changed files with 2572 additions and 2481 deletions

View File

@@ -1,35 +1,35 @@
<script setup lang="ts">
interface Props {
modelValue?: any
color?: 'regular' | 'primary'
checked?: boolean
disabled?: boolean
modelValue?: any
color?: 'regular' | 'primary'
checked?: boolean
disabled?: boolean
}
const props = withDefaults(defineProps<Props>(), {
color: 'regular'
color: 'regular'
})
const emit = defineEmits<{
'update:modelValue': [value: any]
'update:modelValue': [value: any]
}>()
const styleClass = computed(() => {
const colorVariants = {
regular: '',
primary: 'dui-checkbox-primary'
}
const colorClass = colorVariants[props.color]
return [colorClass]
const colorVariants = {
regular: '',
primary: 'dui-checkbox-primary'
}
const colorClass = colorVariants[props.color]
return [colorClass]
})
</script>
<template>
<input
type="checkbox"
class="dui-checkbox dui-checkbox-sm border-secondary"
:class="styleClass"
:checked="props.modelValue || props.checked"
@change="emit('update:modelValue', ($event.target as HTMLInputElement).checked)"
:disabled="props.disabled"
/>
<input
type="checkbox"
class="dui-checkbox dui-checkbox-sm border-secondary"
:class="styleClass"
:checked="props.modelValue || props.checked"
@change="emit('update:modelValue', ($event.target as HTMLInputElement).checked)"
:disabled="props.disabled"
/>
</template>