Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![cfg(feature = "button")]
use darth_rust::DarthRust;
use leptos::*;

#[derive(DarthRust, Default)]
pub struct ButtonBuild {
    class: &'static str,
    kind: &'static str,
}

#[component]
pub fn Button(props: ButtonBuild, children: Children) -> impl IntoView {
    view! {
        <button class=props.class type=props.kind>
            {children()}
        </button>
    }
}