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
use leptos::prelude::*;

#[component]
pub fn Figure<'a>(
    #[prop(optional, into)] caption: &'a str,
    #[prop(optional, into)] class: &'a str,
    children: Children,
) -> impl IntoView {
    let class = format!("figcaption {}", class.trim());
    view! {
        <figure class=class>
            {children()} <figcaption class="figure-caption">{caption}</figcaption>
        </figure>
    }
}