patternfly_yew/components/dual_list_selector/control/
wrapper.rs

1//! The DualListSelectorControlsWrapper component
2
3use yew::prelude::*;
4
5/// Acts as the container for the DualListSelectorControl sub-components.
6#[derive(Debug, Clone, PartialEq, Properties)]
7pub struct DualListSelectorControlsWrapperProps {
8    /// Anything that can be rendered inside of the wrapper.
9    pub children: Html,
10
11    /// Additional classes added to the wrapper.
12    #[prop_or_default]
13    pub class: Classes,
14}
15
16#[function_component(DualListSelectorControlsWrapper)]
17pub fn wrapper(props: &DualListSelectorControlsWrapperProps) -> Html {
18    // TODO key handling
19    let class = classes!["pf-v5-c-dual-list-selector__controls", props.class.clone()];
20    html! {
21        <div {class} tabindex=0 role="group">
22            { props.children.clone() }
23        </div>
24    }
25}