pub fn dialog_provider(
args: DialogProviderArgs,
state: DialogProviderState,
main_content: impl FnOnce(),
dialog_content: impl FnOnce(f32) + Send + Sync + 'static,
)Expand description
§dialog_provider
Provide a modal dialog at the top level of an application.
§Usage
Show modal content for alerts, confirmation dialogs, multi-step forms, or onboarding steps that require blocking user interaction with the main UI.
§Parameters
args— configuration for dialog appearance and theon_close_requestcallback; seeDialogProviderArgs.state— a clonableDialogProviderStatehandle; useDialogProviderState::new()to create one.main_content— closure that renders the always-visible base UI.dialog_content— closure that renders dialog content; receives af32alpha for animation.
§Examples
use tessera_ui_basic_components::dialog::DialogProviderState;
let state = DialogProviderState::new();
assert!(!state.is_open());
state.open();
assert!(state.is_open());
state.close();
assert!(!state.is_open());