37 lines
1.1 KiB
JavaScript
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) |