From 3b76a285e69aff0dced79ae25d52f54e6955b506 Mon Sep 17 00:00:00 2001 From: Anthony Dodd Date: Sat, 17 Oct 2020 18:46:25 -0500 Subject: [PATCH] A few small documentation updates on ModalCloser. --- src/components/modal.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/modal.rs b/src/components/modal.rs index 7892d38..8c12be9 100644 --- a/src/components/modal.rs +++ b/src/components/modal.rs @@ -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 { /// let bridge = ModalCloser::dispatcher(); /// Self{link, props, bridge} @@ -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,