nightshade-api 0.53.0

Procedural high level API for the nightshade game engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use leptos::prelude::*;

/// Wraps `children` in a focusable span that reveals `text` in a bubble on
/// hover or focus.
#[component]
pub fn Tooltip(#[prop(into)] text: String, children: Children) -> impl IntoView {
    view! {
        <span class="nightshade-tooltip" tabindex="0">
            {children()}
            <span class="nightshade-tooltip-bubble" role="tooltip">
                {text}
            </span>
        </span>
    }
}