use ui::popover::{self, Side};
popover::sheet(
"details",
window.viewport_size(),
Side::Right,
px(320.0),
popover::sheet_panel(&theme, Side::Right)
.p(px(20.0))
.child(popover::dialog_title(&theme, "Details"))
.into_any_element(),
self.sheet.closing_since(),
cx.listener(|view, _, _, cx| popover::close_popup(view, cx, |view: &mut Self| &mut view.sheet)),
)- Pass
closing_since()and close throughpopover::close_popup, or the sheet is unmounted mid-slide. extentis a width onLeftandRight, a height onBottom.- The scrim press is the last argument;
.on_mouse_down_outfrom outside cannot reach it.