pub enum ModalProp {
Animation(ModalAnimation),
Presentation(ModalPresentation),
StatusBarTranslucent(bool),
Orientations(u8),
CloseOnEscape(bool),
CloseOnBackdropPress(bool),
CloseOnSwipe(bool),
Detents(Vec<SheetDetent>),
Detent(Option<SheetDetent>),
DefaultDetent(Option<SheetDetent>),
Grabber(bool),
LargestUndimmedDetent(Option<SheetDetent>),
}Expand description
A modal option (<Dialog …>).
Variants§
Animation(ModalAnimation)
animation: how the dialog appears. Pages and dialogs share the
name, so JS’s value arrives as ScreenProp::Animation, which the
core takes for this on a dialog.
Presentation(ModalPresentation)
presentation: "pageSheet" / "formSheet" keep what is behind
visible (iOS; ignored on Android, the desktops and the web, where a
dialog is a transparent layer over the window and the app’s popup
and backdrop are all it shows).
StatusBarTranslucent(bool)
statusBarTranslucent (Android): the content reaches under the status bar
(default: it starts below).
Orientations(u8)
supportedOrientations (iOS): the orientations it allows (default: the
presenter’s).
CloseOnEscape(bool)
closeOnEscape: Escape and the Android back button close it natively
(default true); either way they call onCancel.
CloseOnBackdropPress(bool)
closeOnBackdropPress: a press on the backdrop part
(backdropClass / backdropStyle, rendered by the runtime) closes
it (default true); either way it calls onCancel.
CloseOnSwipe(bool)
closeOnSwipe: swiping a sheet down (iOS, phone browsers) closes it
natively (default true); either way it calls onCancel.
Detents(Vec<SheetDetent>)
detents: the heights an iOS sheet (presentation "pageSheet" /
"formSheet") rests at (none by default: the system’s full height).
The user drags it between them, the system way; past the smallest
it closes when closeOnSwipe allows. Ignored on other platforms and
presentations: there, Sheet (nsh/base) rests at detents.
Detent(Option<SheetDetent>)
detent: the detent of detents the sheet rests at: it moves there
when the value changes. The user’s moves stand even when the app
does not follow them; follow onDetentChange to keep the value in
step.
DefaultDetent(Option<SheetDetent>)
defaultDetent: the detent it opens at without detent (default
the smallest).
Grabber(bool)
grabber: the sheet shows the system’s grabber at its top (default
false); screen readers move it between detents with it.
LargestUndimmedDetent(Option<SheetDetent>)
largestUndimmedDetent: up to this detent of detents, what is
behind the sheet is not dimmed and takes touches (default: dimmed at
every detent).
Trait Implementations§
Source§impl HostProps for ModalProp
impl HostProps for ModalProp
Source§fn decode<I: HostInput>(
name: &str,
input: &I,
cx: &mut HostCx,
) -> Option<Option<Self>>
fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>
name sets with input: None for a name that is
not one of these props, Some(None) when nothing is to be set.