use openkit::prelude::*;
fn main() {
App::new()
.title("Theme Toggle Demo")
.size(600.0, 400.0)
.theme(Theme::Auto)
.run(|| {
col![24;
label!("Theme Toggle Demo", class: "title"),
label!("The theme automatically matches your system preference."),
label!("Try changing your OS dark/light mode setting!"),
row![16;
button!("Primary", { println!("Primary clicked"); }),
button!("Secondary", Secondary, { println!("Secondary clicked"); }),
button!("Outline", Outline, { println!("Outline clicked"); }),
button!("Ghost", Ghost, { println!("Ghost clicked"); }),
button!("Destructive", Destructive, { println!("Destructive clicked"); }),
],
row![16;
checkbox!("Dark mode enabled", |checked| {
println!("Dark mode: {}", if checked { "ON" } else { "OFF" });
}),
checkbox!("Notifications", true, |checked| {
println!("Notifications: {}", if checked { "ON" } else { "OFF" });
}),
],
textfield!("Type something here...", |value| {
println!("Input: {}", value);
}),
]
})
.expect("Failed to run application");
}