initial commit

This commit is contained in:
Zoe
2023-05-30 15:04:51 -05:00
commit 539805dacb
20 changed files with 14788 additions and 0 deletions

19
components/vlToggle.vue Normal file
View File

@@ -0,0 +1,19 @@
<script setup>
const emit = defineEmits(['update:modelValue'])
const checked = ref(false);
watch(checked, (newValue) => {
emit('update:modelValue', newValue);
});
emit('update:modelValue', checked.value);
function toggleChecked() {
checked.value = !checked.value;
}
</script>
<template>
<button class="vl-toggle-button" @click="toggleChecked()" :aria-pressed="checked" :data-state="(checked) ? 'on' : 'off'">
<slot />
</button>
</template>