use crate::components::{Demo, DemoCode};
use leptos::*;
use melt_ui::*;
use prisms::highlight_str;
#[component]
pub fn ButtonPage() -> impl IntoView {
view! {
"Button"
"Primary"
"Solid"
"Text"
"Link"
"Primary"
"Solid"
"Text"
"Link"
"#,
"rust"
)
>
""
"color"
"Primary Color"
"Success Color"
"Warning Color"
"Error Color"
"Primary Color"
"Success Color"
"Warning Color"
"Error Color"
"#,
"rust"
)
>
""
"icon"
"Error Color Icon"
"Error Color Icon"
"#,
"rust"
)
>
""
"style"
"style blue"
"size"
"style blue"
"size"
"#,
"rust"
)
>
""
}
}
#[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"
"Click Me"
"Click Me"
"Click Me"
"Click Me"
}
"#,
"rust"
)
>
""
}
}