From d107d7d8bd1764ef153660f42f60400fe078f84e Mon Sep 17 00:00:00 2001 From: Luca Trevisani Date: Thu, 17 Aug 2023 16:03:16 +0200 Subject: [PATCH] update modal code comments --- src/native/modal.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/native/modal.rs b/src/native/modal.rs index 143a961a..0a33d5ba 100644 --- a/src/native/modal.rs +++ b/src/native/modal.rs @@ -30,9 +30,8 @@ pub use crate::style::modal::StyleSheet; /// } /// /// let modal = Modal::new( -/// false, /// Text::new("Underlay"), -/// Text::new("Overlay"), +/// Some(Text::new("Overlay")), /// ) /// .backdrop(Message::CloseModal); /// ``` @@ -45,7 +44,7 @@ where { /// The underlying element. underlay: Element<'a, Message, Renderer>, - /// The content of the [`ModalOverlay`](ModalOverlay). + /// The optional content of the [`ModalOverlay`](ModalOverlay). overlay: Option>, /// The optional message that will be send when the user clicked on the backdrop. backdrop: Option, @@ -70,10 +69,9 @@ where /// overlying content. /// /// It expects: - /// * if the overlay of the date picker is visible. /// * the underlay [`Element`] on which this [`Modal`](Modal) /// will be wrapped around. - /// * the content [`Element`] of the [`Modal`](Modal). + /// * the optional overlay [`Element`] of the [`Modal`](Modal). pub fn new( underlay: impl Into>, overlay: Option>>,