Skip to content

Commit

Permalink
A few small documentation updates on ModalCloser.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedodd committed Oct 17, 2020
1 parent 565222e commit 3b76a28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ pub struct ModalCloseMsg(pub String);
///
/// First, in your component which is using this modal, configure a `ModalCloser` dispatcher.
/// ```rust
/// use yew::agent::Dispatcher;
/// use yew::prelude::*;
/// // .. snip ..
/// fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self {
/// let bridge = ModalCloser::dispatcher();
/// Self{link, props, bridge}
Expand Down Expand Up @@ -260,7 +263,7 @@ pub struct ModalCloseMsg(pub String);
/// }
/// ```
///
/// This pattern allows you to communicate with a modal by the ID which you have to it, allowing
/// This pattern allows you to communicate with a modal by its given ID, allowing
/// you to close the modal from anywhere in your application.
pub struct ModalCloser {
link: AgentLink<Self>,
Expand Down

0 comments on commit 3b76a28

Please sign in to comment.