summaryrefslogtreecommitdiff
path: root/src/view/mod.rs
diff options
context:
space:
mode:
authorjelemux <jeremias.weber@protonmail.com>2021-02-07 21:43:48 +0100
committerjelemux <jeremias.weber@protonmail.com>2021-02-07 21:43:48 +0100
commitad9ba30ed217ec9907d1faf389c321a1dcf5c13a (patch)
tree7fdadcde26842e4806881492b993b948c1f2032c /src/view/mod.rs
parentf88f8d7c7dc87cdf47de95b54cc6e9f8429820a4 (diff)
downloadwasm-card-ad9ba30ed217ec9907d1faf389c321a1dcf5c13a.tar.gz
wasm-card-ad9ba30ed217ec9907d1faf389c321a1dcf5c13a.tar.bz2
add organizational properties
Diffstat (limited to 'src/view/mod.rs')
-rw-r--r--src/view/mod.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/view/mod.rs b/src/view/mod.rs
index 65ef06d..0751c53 100644
--- a/src/view/mod.rs
+++ b/src/view/mod.rs
@@ -9,9 +9,19 @@ pub mod name;
pub mod address;
pub mod telephone;
pub mod dates;
+pub mod organizational;
+
+#[derive(Clone, PartialEq, Properties)]
+pub struct InputProps<O, C>
+ where O: VCardPropertyInputObject<C> + Clone,
+ C: VCardPropertyInputComponent<O> + Clone
+{
+ pub generated: Callback<O>,
+ pub weak_link: WeakComponentLink<C>,
+}
/// Trait for types that represent an input component for a vcard property.
-pub trait VCardPropertyInputComponent<T: VCardPropertyInputObject<Self>>: Component {
+pub trait VCardPropertyInputComponent<T: VCardPropertyInputObject<Self>>: Component + Clone + PartialEq {
/// Returns the object containing the input data.
fn get_input_object(&self) -> T;
/// Getter function for the title of the component