42 lines
1020 B
Plaintext
42 lines
1020 B
Plaintext
import { Palette } from "std-widgets.slint";
|
|
import {
|
|
FilledButton,
|
|
SnackBar,
|
|
ListTile,
|
|
MaterialText,
|
|
MaterialPalette,
|
|
MaterialTypography,
|
|
} from "material/material.slint";
|
|
import { Icons } from "material/ui/icons/icons.slint";
|
|
|
|
export struct CalendarEventData {
|
|
id: string,
|
|
date: string,
|
|
time: string,
|
|
summary: string,
|
|
calendar: string,
|
|
}
|
|
|
|
export component Calendar inherits Rectangle {
|
|
in property <[CalendarEventData]> calendar-events;
|
|
|
|
VerticalLayout {
|
|
for event[index] in calendar-events: ListTile {
|
|
avatar_icon: Icons.calendar_today;
|
|
avatar_foreground: Palette.foreground;
|
|
text: event.date;
|
|
supporting-text: event.summary;
|
|
height: 72px;
|
|
|
|
MaterialText {
|
|
text: event.time;
|
|
color: MaterialPalette.on_surface;
|
|
overflow: elide;
|
|
style: MaterialTypography.title_medium;
|
|
}
|
|
}
|
|
|
|
Rectangle { }
|
|
}
|
|
}
|