nightshade-api 0.51.0

Procedural high level API for the nightshade game engine
Documentation
1
2
3
4
5
6
7
8
use leptos::prelude::*;

/// A small inline label. Pass a `variant` class (such as `"success"` or
/// `"danger"`) to color it and put the label text in `children`.
#[component]
pub fn Badge(#[prop(into, optional)] variant: String, children: Children) -> impl IntoView {
    view! { <span class=format!("nightshade-badge {variant}")>{children()}</span> }
}