summaryrefslogtreecommitdiff
path: root/src/view/telephone.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/telephone.rs')
-rw-r--r--src/view/telephone.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/view/telephone.rs b/src/view/telephone.rs
index 5db8ae1..dc93632 100644
--- a/src/view/telephone.rs
+++ b/src/view/telephone.rs
@@ -1,11 +1,13 @@
+use crate::view::InputProps;
use yew::prelude::*;
use yewtil::NeqAssign;
-use crate::view::WeakComponentLink;
use crate::viewmodel::Error;
use crate::viewmodel::telephone::*;
use crate::viewmodel::VCardPropertyInputObject;
use super::VCardPropertyInputComponent;
+type Props = InputProps<Telephone,TelephoneView>;
+
/// View Component for a `telephone` field
///
/// # Examples
@@ -20,6 +22,7 @@ use super::VCardPropertyInputComponent;
/// />
/// };
/// ```
+#[derive(Clone,PartialEq)]
pub struct TelephoneView {
props: Props,
value: Telephone,
@@ -41,12 +44,6 @@ pub enum Msg {
Generate,
}
-#[derive(Clone, PartialEq, Properties)]
-pub struct Props {
- pub generated: Callback<Telephone>,
- pub weak_link: WeakComponentLink<TelephoneView>,
-}
-
impl VCardPropertyInputComponent<Telephone> for TelephoneView {
fn get_input_object(&self) -> Telephone {
self.value.clone()