From fd5b054fe655c81533c8a1138ba55a82a7b9d085 Mon Sep 17 00:00:00 2001 From: jelemux Date: Fri, 5 Feb 2021 18:05:16 +0100 Subject: add date properties --- src/viewmodel/mod.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/viewmodel/mod.rs') diff --git a/src/viewmodel/mod.rs b/src/viewmodel/mod.rs index d5d0de3..edd1a8e 100644 --- a/src/viewmodel/mod.rs +++ b/src/viewmodel/mod.rs @@ -2,10 +2,11 @@ use yew::prelude::*; use crate::view::VCardPropertyInputComponent; pub mod vcard; +pub mod utility; pub mod address; pub mod name; pub mod telephone; -pub mod utility; +pub mod dates; /// Trait for types that represent the data of a vcard property used inside of a `VCardPropertyInputComponent`. @@ -48,6 +49,7 @@ pub enum VCardPropertyInputField { placeholder: Option, oninput: Callback, value: String, + typ: String }, CheckBox { label: String, @@ -67,7 +69,8 @@ impl VCardPropertyInputField { placeholder, oninput, value: _, - } => Self::text_field_input(label, id, placeholder, oninput), + typ, + } => Self::text_field_input(label, id, placeholder, oninput, typ), Self::CheckBox { label, id, @@ -77,7 +80,7 @@ impl VCardPropertyInputField { } } /// Returns an `Html` representation of a text input field with the given parameters. - fn text_field_input(label: &str, id: &Option, placeholder: &Option, oninput: &Callback) -> Html { + fn text_field_input(label: &str, id: &Option, placeholder: &Option, oninput: &Callback, typ: &str) -> Html { html!{
{ label }
-- cgit v1.2.3