leptos-bootstrap 0.0.3

Bootstrap styled components for leptos.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use leptos::prelude::*;

#[component]
pub fn FormGroup<'a>(
    label: &'a str,
    #[prop(optional, into)] help: &'a str,
    #[prop(optional, into)] class: &'a str,
    children: Children,
) -> impl IntoView {
    view! {
        <div class=class>
            <label class="form-label">{label}</label>
            {children()}
            <div class="form-text">{help}</div>
        </div>
    }
}