lollms-webui/web/src/components/SafeSwitch.vue
Saifeddine ALOUI c55532c1c7 upgraded tool
2024-02-10 01:32:17 +01:00

26 lines
550 B
Vue

<template>
<div>
<label class="switch">
<input type="checkbox" v-bind:checked="isChecked" @change="$emit('update:isChecked', $event.target.checked)">
<span class="slider round"></span>
</label>
</div>
</template>
<script>
export default {
name: 'SafeSwitch',
props: ['isChecked'],
data() {
return {
}
},
methods: {
toggleSwitch() {
// Handle the switch toggle logic here
console.log('Switch toggled:', this.isChecked);
}
}
}
</script>