calendar/src/components/DayCell.vue
Leo Vasanko 018b9ecc55 vue (#1)
Port to Vue. Also implements plenty of new functionality.
2025-08-22 23:34:33 +01:00

28 lines
575 B
Vue

<template>
<div class="cell" :class="cellClasses" :data-date="day.date">
<h1>{{ day.displayText }}</h1>
<span v-if="day.lunarPhase" class="lunar-phase">{{ day.lunarPhase }}</span>
</div>
</template>
<script setup>
import { computed } from 'vue'
const props = defineProps({
day: {
type: Object,
required: true
}
})
const cellClasses = computed(() => {
return {
[props.day.monthClass]: true,
today: props.day.isToday,
selected: props.day.isSelected,
weekend: props.day.isWeekend,
firstday: props.day.isFirstDay
}
})
</script>