2022-02-12 20:03:08 +00:00
|
|
|
use dioxus::prelude::*;
|
|
|
|
|
|
|
|
fn main() {
|
2022-07-09 19:15:20 +00:00
|
|
|
dioxus_tui::launch(app);
|
2022-02-12 20:03:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn app(cx: Scope) -> Element {
|
2022-03-09 18:36:30 +00:00
|
|
|
let radius = use_state(&cx, || 0);
|
2022-02-12 20:03:08 +00:00
|
|
|
|
|
|
|
cx.render(rsx! {
|
|
|
|
div {
|
|
|
|
width: "100%",
|
|
|
|
height: "100%",
|
|
|
|
justify_content: "center",
|
|
|
|
align_items: "center",
|
|
|
|
background_color: "hsl(248, 53%, 58%)",
|
2022-05-12 08:03:51 +00:00
|
|
|
onwheel: move |w| radius.modify(|r| (r + w.delta().strip_units().y as i8).abs()),
|
2022-02-12 20:03:08 +00:00
|
|
|
|
|
|
|
border_style: "solid none solid double",
|
|
|
|
border_width: "thick",
|
|
|
|
border_radius: "{radius}px",
|
|
|
|
border_color: "#0000FF #FF00FF #FF0000 #00FF00",
|
|
|
|
|
|
|
|
"{radius}"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|