This repository has been archived by the owner on May 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f77b4d7
commit 678b0d2
Showing
8 changed files
with
1,714 additions
and
1,843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
<template> | ||
<div class="h-screen flex flex-col bg-gray-900 text-white"> | ||
<div class="h-screen"> | ||
<NuxtPage class="flex-1" /> | ||
<NuxtModals /> | ||
</div> | ||
</template> | ||
|
||
<style lang="postcss"> | ||
html { | ||
@apply bg-gray-900 text-white | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
import { defineNuxtConfig } from 'nuxt' | ||
|
||
export default defineNuxtConfig({ | ||
modules: [ | ||
'@unocss/nuxt', | ||
'../dist/module.mjs', | ||
'../src/module', | ||
], | ||
unocss: { | ||
preflight: true, | ||
icons: true, | ||
}, | ||
css: ['@unocss/reset/antfu.css'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<script setup> | ||
import { MyModal } from '#components' | ||
const { open } = useModals() | ||
const text = ref('') | ||
const getText = async () => { | ||
const value = await open(MyModal) | ||
const text = ref('Click on the pen to change me !') | ||
const edit = async () => { | ||
const newValue = await open(MyModal, { text }) | ||
if (value !== null) | ||
text.value = value | ||
text.value = newValue | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-col justify-center items-center"> | ||
Text: {{ text }} | ||
<button class="rounded bg-emerald-500 bg-emerald-500 px-3 py-2 hover:bg-emerald-400" @click="getText"> | ||
Click me to change text | ||
</button> | ||
<div row class="justify-center items-center gap-2"> | ||
<span class="text-lg">{{ text }}</span> | ||
<button class="i-mdi-pencil text-2xl text-indigo-500 hover:text-indigo-600" @click="edit" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { | ||
defineConfig, | ||
presetIcons, | ||
presetUno, | ||
transformerDirectives, | ||
} from 'unocss' | ||
|
||
export default defineConfig({ | ||
presets: [ | ||
presetUno(), | ||
presetIcons(), | ||
], | ||
transformers: [ | ||
transformerDirectives(), | ||
], | ||
}) |
Oops, something went wrong.