2024-04-10 12:28:43 +00:00
|
|
|
import { Metrics, DarkPalette } from "../theme.slint";
|
2024-04-10 12:40:35 +00:00
|
|
|
import { VerticalBox } from "layout.slint";
|
2024-04-09 21:12:54 +00:00
|
|
|
|
2024-04-10 12:28:43 +00:00
|
|
|
export component Panel inherits VerticalBox {
|
2024-04-09 21:12:54 +00:00
|
|
|
in property <string> title: "Title";
|
|
|
|
in property <TextHorizontalAlignment> title-alignment: left;
|
|
|
|
|
2024-04-10 12:28:43 +00:00
|
|
|
Text {
|
|
|
|
height: Metrics.size-md;
|
|
|
|
color: DarkPalette.text[4];
|
|
|
|
font-size: Metrics.font-md;
|
|
|
|
text: title;
|
|
|
|
vertical-alignment: center;
|
|
|
|
horizontal-alignment: title-alignment;
|
2024-04-09 21:12:54 +00:00
|
|
|
}
|
2024-04-10 12:28:43 +00:00
|
|
|
|
|
|
|
@children
|
2024-04-09 21:12:54 +00:00
|
|
|
}
|