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,
footer_link,
footer_items,
toc_active,
}: EuvDocLayoutProps = node.try_get_props().unwrap_or_default();
let children: VirtualNode = node.get_children().into();
html! {
div {
class: c_euv_doc_layout()
div {
class: c_euv_doc_content()
div {
class: c_euv_doc_body()
children
}
div {
class: c_euv_doc_tail()
euv_pagination {
prev_label
next_label
prev
next
}
if { !footer.is_empty() || !footer_items.is_empty() } {
euv_footer {
text: footer
link: footer_link
items: footer_items
}
}
}
}
if { !toc_items.is_empty() } {
div {
class: c_euv_doc_toc()
euv_toc {
title: toc_title
items: toc_items
active: toc_active
}
}
}
}
}
}