use std::ops::Deref;
use yew::{Children, Properties};
#[derive(PartialEq, Properties, Debug, Default, Clone)]
pub struct PropsWithChildren<T: PartialEq> {
pub data: T,
pub children: Children,
}
impl<T: PartialEq + Clone> PropsWithChildren<T> {
pub fn cloned(&self) -> T {
self.data.clone()
}
}
impl<T: PartialEq> Deref for PropsWithChildren<T> {
type Target = T;
fn deref(&self) -> &Self::Target {
&self.data
}
}