Migrate to Vue 3 and Vite

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-07-12 10:55:28 +02:00
parent 8f4099ee33
commit ee20e03cc2
464 changed files with 31515 additions and 32758 deletions

View File

@@ -0,0 +1,27 @@
<template>
<Switch
v-model="modelValue"
:class="disabled ? 'bg-teal-700' : 'bg-teal-900'"
class="relative inline-flex h-6 w-11 items-center rounded-full"
>
<span class="sr-only"><slot /></span>
<span
:class="disabled ? 'translate-x-1' : 'translate-x-6'"
class="inline-block h-4 w-4 transform rounded-full bg-white"
/>
</Switch>
</template>
<script lang="ts" setup>
import { Switch } from "@headlessui/vue";
withDefaults(
defineProps<{
modelValue: boolean;
disabled?: boolean;
required?: boolean;
}>(),
{
disabled: false,
required: false,
}
);
</script>