chore: add @tailwindcss/postcss and PostCSS setup for Tailwind v4
This commit is contained in:
parent
40c249264c
commit
1cee60953e
17 changed files with 263 additions and 7 deletions
17
app/components/ColorModeToggle.vue
Normal file
17
app/components/ColorModeToggle.vue
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<UButton color="gray" variant="ghost" @click="toggle">
|
||||
<UIcon :name="icon" class="w-5 h-5" />
|
||||
</UButton>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const colorMode = useColorMode();
|
||||
const icon = computed(() =>
|
||||
colorMode.value === "dark"
|
||||
? "i-heroicons-moon-20-solid"
|
||||
: "i-heroicons-sun-20-solid"
|
||||
);
|
||||
const toggle = () => {
|
||||
colorMode.preference = colorMode.value === "dark" ? "light" : "dark";
|
||||
};
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue