ovdashboard/ui/src/components/calendar/Calendar.vue

40 lines
901 B
Vue
Raw Normal View History

2022-09-13 21:30:20 +00:00
<template>
2022-09-15 14:16:43 +00:00
<v-list class="py-0">
2022-09-15 13:22:44 +00:00
<span class="text-h5 text-md-h4 text-truncate d-inline-block mb-2">
{{ title }}
</span>
2022-09-15 13:03:19 +00:00
<template v-for="(event, index) in events">
<EventItem :event="event" :key="event.hash" />
<v-divider
2022-09-15 13:03:19 +00:00
v-if="index < events.length - 1"
class="mx-5"
:key="event.hash + '-div'"
/>
</template>
2022-09-13 21:30:20 +00:00
</v-list>
</template>
<script lang="ts">
2022-09-15 13:03:19 +00:00
import { Component, Prop, Vue } from "vue-property-decorator";
import { EventData } from "./model";
2022-09-14 23:05:34 +00:00
import EventItem from "./EventItem.vue";
2022-09-14 13:21:35 +00:00
@Component({
2022-09-14 23:04:26 +00:00
components: {
EventItem,
2022-09-14 13:21:35 +00:00
},
})
export default class Calendar extends Vue {
2022-09-15 13:03:19 +00:00
@Prop({ default: "CALENDAR" })
private readonly title!: string;
2022-09-15 12:20:48 +00:00
2022-09-15 13:03:19 +00:00
@Prop({ default: () => [] })
private readonly events!: Array<EventData>;
2022-09-14 13:21:35 +00:00
}
2022-09-13 21:30:20 +00:00
</script>
<style scoped>
.v-list .v-divider {
border-color: rgba(0, 0, 0, 0.25);
}
2022-09-13 21:30:20 +00:00
</style>