sidebar work in progress

This commit is contained in:
2025-05-10 23:23:58 +02:00
parent c7ebcf0b33
commit 0a1d0f1ca1
3 changed files with 45 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date';
import Title1 from './Title1.vue';
import { UCard } from '#components';
const selectedDate = shallowRef(new CalendarDate(2024, 6, 29));
defineProps<{
todos: string[]
}>()
</script>
<template>
<UCard class="w-64 h-full">
<template #header>
<Title1>Calendar</Title1>
<UCalendar v-model="selectedDate" />
</template>
<template #default>
<Title1>Todos</Title1>
<div class="flex gap-2 flex-col">
<UCard v-for="todo in todos">{{ todo }}</UCard>
</div>
</template>
</UCard>
</template>
<style scoped></style>

View File

@@ -0,0 +1,11 @@
<template>
<h1 class="text-xl font-bold">
<slot />
</h1>
</template>
<script setup lang="ts">
</script>
<style scoped></style>

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { UButton } from '#components';
import Sidebar from '~/components/ui/Sidebar.vue';
const todos = ["Staistics", "Computer Graphics", "Webdev"]
</script>
<template>
<div>
<UButton>Click me</UButton>
<div class="h-screen w-screen p-4">
<Sidebar :todos="todos" />
</div>
</template>