2021-12-24 vitesse-lite clone

This commit is contained in:
2021-12-24 11:43:10 +09:00
parent f7a10ba944
commit a454ae4664
35 changed files with 4439 additions and 17 deletions

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
const props = defineProps<{
initial: number
}>()
const { count, inc, dec } = useCounter(props.initial)
</script>
<template>
<div>
{{ count }}
<button class="inc" @click="inc()">
+
</button>
<button class="dec" @click="dec()">
-
</button>
</div>
</template>

21
src/components/Footer.vue Normal file
View File

@@ -0,0 +1,21 @@
<script setup lang="ts">
import { isDark, toggleDark } from '~/composables'
</script>
<template>
<nav text-xl mt-6 inline-flex gap-2>
<button class="icon-btn !outline-none" @click="toggleDark()">
<div v-if="isDark" i-carbon-moon />
<div v-else i-carbon-sun />
</button>
<a
class="icon-btn"
i-carbon-logo-github
rel="noreferrer"
href="https://github.com/antfu/vitesse-lite"
target="_blank"
title="GitHub"
/>
</nav>
</template>

9
src/components/README.md Normal file
View File

@@ -0,0 +1,9 @@
## Components
Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).
### Icons
You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
It will only bundle the icons you use. Check out [`unplugin-icons`](https://github.com/antfu/unplugin-icons) for more details.