Add AMOLED switch component and update usage

This commit is contained in:
land 2025-11-03 14:38:38 +05:30
parent 7f09a9d148
commit ba9fe8fa3f
3 changed files with 56 additions and 4 deletions

View file

@ -2,11 +2,11 @@
import { Switch } from '@headlessui/vue'
import { ref } from 'vue'
const model = defineModel()
const enabled = defineModel({ default: false })
</script>
<template>
<Switch v-model="model" class="switch" :class="{ enabled: model }">
<Switch v-model="enabled" class="switch" :class="{ enabled }">
<span class="thumb" />
</Switch>
</template>