summaryrefslogtreecommitdiff
path: root/src/view/address.rs
diff options
context:
space:
mode:
authorjelemux <jeremias.weber@protonmail.com>2021-02-04 13:30:15 +0100
committerjelemux <jeremias.weber@protonmail.com>2021-02-04 13:30:15 +0100
commit69ceb1f9ec68e41029759a6fcff3168adb6df373 (patch)
tree194f21d845da5617e1c6d7fadaab380d10e472f7 /src/view/address.rs
parent51bf8e89ce07864b70d7138bbc3958faf499cc67 (diff)
downloadwasm-card-69ceb1f9ec68e41029759a6fcff3168adb6df373.tar.gz
wasm-card-69ceb1f9ec68e41029759a6fcff3168adb6df373.tar.bz2
minor refactoring + comments
Diffstat (limited to 'src/view/address.rs')
-rw-r--r--src/view/address.rs19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/view/address.rs b/src/view/address.rs
index a16d93a..01c949b 100644
--- a/src/view/address.rs
+++ b/src/view/address.rs
@@ -1,15 +1,28 @@
use yew::services::ConsoleService;
+use yew::prelude::*;
+use yewtil::NeqAssign;
use yewtil::ptr::Irc;
use yewtil::ptr::Mrc;
use super::WeakComponentLink;
-use yew::prelude::*;
-use yewtil::NeqAssign;
use crate::viewmodel::address::*;
use crate::viewmodel::VCardPropertyInputObject;
use super::VCardPropertyInputComponent;
use crate::viewmodel::Error;
-
+/// View Component for a `address` field
+///
+/// # Examples
+///
+/// ```compile_fail
+/// let html = html!{
+/// <AddressView weak_link=some_weak_component_link
+/// generated=self.link.callback(
+/// |n: Irc<Address>|
+/// Msg::GeneratedAddress(some_address)
+/// )
+/// />
+/// };
+/// ```
pub struct AddressView {
props: Props,
value: Mrc<Address>,