docs: new structure (#1282)

Co-authored-by: Sébastien Chopin <seb@nuxt.com>
This commit is contained in:
Benjamin Canac
2024-01-30 11:24:02 +01:00
committed by GitHub
parent 20ac4b3332
commit e92be71749
206 changed files with 1725 additions and 1851 deletions

View File

@@ -1,16 +1,15 @@
<script setup>
const date = ref(new Date())
<script setup lang="ts">
import { format } from 'date-fns'
const label = computed(() => date.value.toLocaleDateString('en-us', { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' })
)
const date = ref(new Date())
</script>
<template>
<UPopover :popper="{ placement: 'bottom-start' }">
<UButton icon="i-heroicons-calendar-days-20-solid" :label="label" />
<UButton icon="i-heroicons-calendar-days-20-solid" :label="format(date, 'd MMM, yyy')" />
<template #panel="{ close }">
<LazyDatePicker v-model="date" @close="close" />
<DatePicker v-model="date" @close="close" />
</template>
</UPopover>
</template>