pub fn bottom_sheet_provider(
args: BottomSheetProviderArgs,
state: BottomSheetProviderState,
main_content: impl FnOnce() + Send + Sync + 'static,
bottom_sheet_content: impl FnOnce() + Send + Sync + 'static,
)Expand description
§bottom_sheet_provider
Provides a modal bottom sheet for contextual actions or information.
§Usage
Show contextual menus, supplemental information, or simple forms without navigating away from the main screen.
§Parameters
args— configuration for the sheet’s appearance and behavior; seeBottomSheetProviderArgs.state— a clonableBottomSheetProviderStateused to open and close the sheet.main_content— closure that renders the always-visible base UI.bottom_sheet_content— closure that renders the content of the sheet itself.
§Examples
use tessera_ui_basic_components::bottom_sheet::BottomSheetProviderState;
let state = BottomSheetProviderState::new();
assert!(!state.is_open());
state.open();
assert!(state.is_open());
state.close();
assert!(!state.is_open());