feat(module): refresh playground style and dark mode
This commit is contained in:
parent
bd73c6447b
commit
e7ea5df1b0
|
|
@ -1,11 +1,38 @@
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
|
import { MoonIcon, SunIcon } from '@radix-icons/vue'
|
||||||
|
|
||||||
|
const isDark = ref(true)
|
||||||
|
useHead({ htmlAttrs: { class: () => isDark.value ? 'dark' : '' } })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<main class="flex flex-col min-h-dvh">
|
||||||
<UiButton :variant="'destructive'">
|
<header class="border-b py-1 ">
|
||||||
hi
|
<div class="container flex justify-between items-center ">
|
||||||
</UiButton>
|
<h1 class="font-medium">
|
||||||
Nuxt module playground!
|
shadcn-vue Playground
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<ClientOnly>
|
||||||
|
<button
|
||||||
|
class="p-2 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors rounded-md"
|
||||||
|
aria-label="Toggle dark mode"
|
||||||
|
@click="isDark = !isDark"
|
||||||
|
>
|
||||||
|
<component
|
||||||
|
:is="isDark ? SunIcon : MoonIcon"
|
||||||
|
class="size-5"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</ClientOnly>
|
||||||
</div>
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Try your components here -->
|
||||||
|
<section class="container grow my-4 p-4 rounded-md border grid place-content-center">
|
||||||
|
<UiButton variant="destructive">
|
||||||
|
Hi
|
||||||
|
</UiButton>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user