Files
apps/calendar/Week/TimedLabelsColumn.js
metacryst 0d6c7683ff init
2026-04-28 20:05:00 -05:00

37 lines
1.1 KiB
JavaScript

class TimedLabelsColumn extends Shadow {
constructor(slots, slotHeight, sidebarWidth) {
super()
this.slots = slots;
this.slotHeight = slotHeight;
this.sidebarWidth = sidebarWidth
}
render() {
VStack(() => {
this.slots.forEach(slot => {
const isHour = slot.minute === 0;
VStack(() => {
p(isHour ? slot.label : "")
.margin(0)
.fontSize(0.9, em)
.color("var(--headertext)")
.transform("translateY(-0.55em)")
})
.height(this.slotHeight, em)
.justifyContent("flex-start")
.alignItems("center")
.paddingHorizontal(0.5, em)
.width(3, em)
.boxSizing("border-box")
})
})
.paddingTop(this.slotHeight, em)
.width(this.sidebarWidth, em)
.background("var(--sidebottombars)")
.boxSizing("border-box")
.borderRight("1px solid var(--divider)")
}
}
register(TimedLabelsColumn)