use yew::prelude::*;
use yew::virtual_dom::{AttributeOrProperty, Attributes, VNode, VTag};
pub(crate) fn wrapper_elt_with_attributes(
child: VNode,
element_name: &'static str,
attributes: &'static [(&'static str, AttributeOrProperty)],
) -> Html {
let mut elt = VTag::new(element_name);
elt.key = child.key().map(ToOwned::to_owned);
elt.attributes = Attributes::Static(attributes);
elt.add_child(child);
VNode::VTag(elt.into())
}
pub(crate) fn wrapper_div_with_attributes(
child: VNode,
attributes: &'static [(&'static str, AttributeOrProperty)],
) -> Html {
wrapper_elt_with_attributes(child, "div", attributes)
}