diff options
Diffstat (limited to 'src/view/address.rs')
-rw-r--r-- | src/view/address.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/view/address.rs b/src/view/address.rs index 1aedcbd..a945272 100644 --- a/src/view/address.rs +++ b/src/view/address.rs @@ -1,11 +1,13 @@ +use crate::view::InputProps; use yew::prelude::*; use yewtil::NeqAssign; -use super::WeakComponentLink; use crate::viewmodel::address::*; use crate::viewmodel::VCardPropertyInputObject; use super::VCardPropertyInputComponent; use crate::viewmodel::Error; +type Props = InputProps<Address,AddressView>; + /// View Component for a `address` field /// /// # Examples @@ -20,6 +22,7 @@ use crate::viewmodel::Error; /// /> /// }; /// ``` +#[derive(Clone,PartialEq)] pub struct AddressView { props: Props, value: Address, @@ -40,12 +43,6 @@ pub enum Msg { Generate, } -#[derive(Clone, PartialEq, Properties)] -pub struct Props { - pub generated: Callback<Address>, - pub weak_link: WeakComponentLink<AddressView>, -} - impl VCardPropertyInputComponent<Address> for AddressView { fn get_input_object(&self) -> Address { self.value.clone() |