feat: separate components

This commit is contained in:
2026-05-07 01:36:00 +05:00
parent 6f45ebaadc
commit 04755cf05b
5 changed files with 90 additions and 65 deletions
+38
View File
@@ -0,0 +1,38 @@
import {
Button,
HorizontalBox,
} from "std-widgets.slint";
import { BrowserConfig } from "./types.slint";
export component BrowserItem {
height: 80px;
in property <BrowserConfig> browser;
Rectangle {
height: 100%;
width: 100%;
background: rgba(30, 41, 59, 0.3);
HorizontalBox {
height: 80px;
padding: 8px;
alignment: space-between;
Text {
text: browser.path;
vertical_alignment: center;
}
Text {
text: browser.flags;
vertical_alignment: center;
}
VerticalLayout {
alignment: center;
Button {
text: "use";
}
}
}
}
}