// SPDX-License-Identifier: GPL-3.0-or-later
import { KitButton, KitDrawer, KitTextField, KitTheme, KitThemes } from "@kit/kit.slint";

export component Example inherits Window {
    title: "KitDrawer example";
    preferred-width: 560px;
    preferred-height: 420px;
    max-width: 100000px;
    max-height: 100000px;
    background: root.theme.canvas;
    in-out property <KitTheme> theme: KitThemes.light;
    in-out property <string> status;
    KitDrawer { theme: root.theme; panel-width: 380px * root.theme.text-scale; width: parent.width; height: parent.height; title: "Project details"; state: { open: true, topmost: true, busy: false }; Text { text: "Field notes"; color: root.theme.text-primary; font-size: 14px * root.theme.text-scale; wrap: word-wrap; vertical-stretch: 0; }KitTextField { theme: root.theme; label: "Project name"; text: "Field notes"; }KitButton { theme: root.theme; text: "Save changes"; activated => { root.status = "Action requested"; } } if root.status != "": Text { text: root.status; color: root.theme.text-secondary; font-size: 12px * root.theme.text-scale; wrap: word-wrap; vertical-stretch: 0; } }
}
