consecuit_html 0.2.0

HTML components for the Consecuit web UI framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::elem::{use_element, HtmlProps, UseElementArgs};
use consecuit::prelude::{ComponentBuilder, ContainerReturn};
use web_sys::HtmlBodyElement;
pub fn body(cc: ComponentBuilder, props: HtmlProps<HtmlBodyElement>) -> impl ContainerReturn {
    let cc = cc.init();
    let parent = cc.get_parent_node();
    let (cc, elem) = cc.hook(
        use_element::<HtmlBodyElement>,
        UseElementArgs {
            tag_name: "body",
            props,
            parent,
        },
    );
    cc.bare_container_node(elem.into())
}