use super::*;
#[component]
pub fn euv_doc_layout(node: VirtualNode<EuvDocLayoutProps>) -> VirtualNode {
let EuvDocLayoutProps {
toc_title,
toc_items,
prev_label,
next_label,
prev,
next,
footer,
}: EuvDocLayoutProps = node.try_get_props().unwrap_or_default();
let children: VirtualNode = node.get_child_node();
html! {
div {
class: c_euv_doc_layout()
div {
class: c_euv_doc_content()
children
euv_pagination {
prev_label
next_label
prev
next
}
if { !footer.is_empty() } {
footer {
class: c_euv_footer()
{
footer
}
}
}
}
if { !toc_items.is_empty() } {
div {
class: c_euv_doc_toc()
euv_toc {
title: toc_title
items: toc_items
}
}
}
}
}
}