use appy::{components::*, hooks::*, types::*, *}; use std::rc::Rc; #[derive_component(Default, ComponentBuilder, SnakeFactory)] pub struct Button { text: String, on_click: Option>, } #[function_component] fn _button(props: Button) -> Elements { let hover_state = use_hover_state_ref(); let c = match *hover_state { HoverState::Normal => 0x808080, HoverState::Hover => 0xc0c0c0, HoverState::Active => 0x404040, }; apx! { } } #[main_window] pub fn main() -> Elements { let x = use_spring(|| 0.0, SpringConf::DEFAULT); //println!("render"); apx! {