use crate::components::{Demo, DemoCode}; use leptos::*; use prisms::highlight_str; use thaw::*; #[component] pub fn ButtonPage() -> impl IntoView { view! {

"Button"

"Primary" "#, "rust" ) > ""

"color"

"Primary Color" "#, "rust" ) > ""

"icon"

"#, "rust" ) > ""

"style"

"style blue" "#, "rust" ) > ""

"Button Props"

"Name" "Type" "Default" "Description"
"style" "MaybeSignal" r#""""# "Button's style."
"variant" "MaybeSignal" "ButtonVariant::Primary" "Button's variant."
"color" "MaybeSignal" "ButtonColor::Primary" "Button's color."
"round" "MaybeSignal" "false" "Whether the button shows rounded corners."
"icon" "Option" "None" "The icon of the button."
"loading" "MaybeSignal" "false" "Whether the button shows the loading status."
"disabled" "MaybeSignal" "false" "Whether the button is disabled."
"on_click" "Option>" "None" "Listen for button click events."
"children" "Children" "Button's content."
} } #[component] pub fn LoadingButton() -> impl IntoView { let loading = create_rw_signal(false); let on_click = move |_| { loading.set(true); set_timeout( move || { loading.set(false); }, std::time::Duration::new(2, 0), ); }; view! {

"Loading"

} "#, "rust" ) > "" } }