1
0
tethys.backend/resources/js/Components/unused/Checkbox.vue

31 lines
642 B
Vue
Raw Normal View History

2023-03-03 15:54:28 +00:00
<script setup>
import { computed } from 'vue';
const emit = defineEmits(['update:checked']);
const props = defineProps({
checked: {
type: [Array, Boolean],
default: false,
},
value: {
default: null,
},
});
const proxyChecked = computed({
get() {
return props.checked;
},
set(val) {
emit("update:checked", val);
},
});
</script>
<template>
<input type="checkbox" :value="value" v-model="proxyChecked"
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50">
</template>