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