init
This commit is contained in:
37
calendar/Week/TimedLabelsColumn.js
Normal file
37
calendar/Week/TimedLabelsColumn.js
Normal file
@@ -0,0 +1,37 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user