-
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Theme, SpacingSystem, Typography, Animations } from "../theme/theme.slint";
|
||||
import { Theme, SpacingSystem, Typography } from "../theme/theme.slint";
|
||||
import { Animations } from "../utils/animations.slint";
|
||||
|
||||
export struct AccordionItemData {
|
||||
title: string,
|
||||
|
||||
40
ui/components/empty.slint
Normal file
40
ui/components/empty.slint
Normal file
@@ -0,0 +1,40 @@
|
||||
// Empty state component - Shows when no data is available
|
||||
import { Theme, Typography, SpacingSystem } from "../theme/theme.slint";
|
||||
|
||||
export component Empty inherits Rectangle {
|
||||
in property <string> icon: "📭";
|
||||
in property <string> title: "No Data";
|
||||
in property <string> description: "";
|
||||
|
||||
background: transparent;
|
||||
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
spacing: SpacingSystem.spacing.s3;
|
||||
|
||||
// Icon
|
||||
Text {
|
||||
text: root.icon;
|
||||
font-size: 48px;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
|
||||
// Title
|
||||
Text {
|
||||
text: root.title;
|
||||
font-size: Typography.sizes.lg;
|
||||
font-weight: Typography.weights.semibold;
|
||||
color: Theme.colors.foreground;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
|
||||
// Description (optional)
|
||||
if root.description != "": Text {
|
||||
text: root.description;
|
||||
font-size: Typography.sizes.sm;
|
||||
color: Theme.colors.muted-foreground;
|
||||
horizontal-alignment: center;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Theme, SpacingSystem, Animations } from "../theme/theme.slint";
|
||||
import { Theme, SpacingSystem } from "../theme/theme.slint";
|
||||
import { Animations } from "../utils/animations.slint";
|
||||
|
||||
export component Switch {
|
||||
in property <bool> checked: false;
|
||||
|
||||
Reference in New Issue
Block a user