use yew::prelude::*; use crate::viewmodel::*; pub mod main; pub mod name; pub mod address; pub mod telephone; pub trait VCardPropertyInputComponent: Component where P: vcard::properties::Property, T: VCardPropertyInputObject { fn get_input_object(&self) -> T; fn get_title(&self) -> String; fn get_errors(&self) -> Vec; fn render_errors(&self) -> Html { html!{ <> { for self.get_errors().iter().map(|err| html!{
{ err }
} ) } } } }