#[cfg(feature = "yew-nested-router")]
mod router;
mod simple;
#[cfg(feature = "yew-nested-router")]
pub use router::*;
pub use simple::*;
use yew::prelude::*;
#[derive(Clone, Debug, PartialEq, Properties)]
pub struct TabContentBodyProperties {
#[prop_or_default]
pub children: Html,
#[prop_or_default]
pub padding: bool,
}
#[function_component(TabContentBody)]
pub fn tab_content_body(props: &TabContentBodyProperties) -> Html {
let mut class = classes!("pf-v5-c-tab-content__body");
if props.padding {
class.push(classes!("pf-m-padding"));
}
html!(
<div {class}>
{ props.children.clone() }
</div>
)
}
#[derive(PartialEq, Properties)]
pub struct TabContentProperties {
#[prop_or_default]
pub id: Option<AttrValue>,
#[prop_or_default]
pub hidden: bool,
#[prop_or_default]
pub children: Html,
#[prop_or_default]
pub class: Classes,
#[prop_or_default]
pub style: Option<AttrValue>,
}
#[function_component(TabContent)]
pub fn tab_content(props: &TabContentProperties) -> Html {
let mut class = Classes::from("pf-v5-c-tab-content");
class.extend(&props.class);
html!(
<section
id={props.id.clone()}
{class}
hidden={props.hidden}
tabindex="0"
role="tabpanel"
style={props.style.clone()}
>
{ props.children.clone() }
</section>
)
}