diff --git a/xilem/src/view/zstack.rs b/xilem/src/view/zstack.rs index a6ba23362..edc9faf8a 100644 --- a/xilem/src/view/zstack.rs +++ b/xilem/src/view/zstack.rs @@ -18,13 +18,18 @@ use masonry::{ /// /// # Example /// -/// This example shows how to add a text label on top of an image. +/// This example shows how to add two text labels on top of each other. /// /// ``` -/// zstack(( -/// image(some_image), -/// label("Overlay text") -/// )) +/// use xilem::WidgetView; +/// use xilem::view::{zstack, label}; +/// +/// fn view() -> impl WidgetView<()> { +/// zstack::<(), (), _>(( +/// label("Background"), +/// label("Foreground") +/// )) +/// } /// ``` pub fn zstack>(sequence: Seq) -> ZStack { ZStack {