pub fn sheet(
id: impl Into<SharedString>,
viewport: Size<Pixels>,
side: Side,
width: Pixels,
content: AnyElement,
closing: Option<Instant>,
on_dismiss: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> AnyElementExpand description
Full-height side panel over a dim scrim — modal pinned to an edge. It
slides in over motion::DIALOG_IN and, once the caller’s Popup
enters its exit phase, back out over motion::MENU_OUT — which it must,
because Popup::finish_close reaps on that spec’s span.
on_dismiss is the scrim click. Unlike the anchored menus, dismissal
cannot be the caller’s .on_mouse_down_out: the scrim lives inside this
deferred layer, so nothing outside can reach it.
The slide is written here rather than as a motion helper because
only the spec is motion — which inset carries it is layout, and it
differs per side.