patternfly_yew/components/progress_stepper/
variant.rs1use super::*;
2use yew::{
3 prelude::*,
4 virtual_dom::{VChild, VComp},
5};
6
7#[derive(PartialEq, Clone)]
8pub struct ProgressStepperChildVariant {
9 props: ProgressStepperChild,
10}
11
12impl<CHILD> From<VChild<CHILD>> for ProgressStepperChildVariant
13where
14 CHILD: BaseComponent,
15 CHILD::Properties: Into<ProgressStepperChild> + Clone,
16{
17 fn from(vchild: VChild<CHILD>) -> Self {
18 Self {
19 props: (*vchild.props).clone().into(),
20 }
21 }
22}
23
24impl From<ProgressStepperChildVariant> for Html {
25 fn from(value: ProgressStepperChildVariant) -> Self {
26 match value.props {
27 ProgressStepperChild::Step(props) => {
28 VComp::new::<ProgressStepperStep>(props, None).into()
29 }
30 }
31 }
32}