BottomSheetShell

fun BottomSheetShell(uiState: BottomSheetShellUIState, modifier: Modifier = Modifier, content: @Composable () -> Unit?, windowInsets: @Composable () -> WindowInsets = { BottomSheetDefaults.windowInsets }, contentScrollState: ScrollableState? = null, icon: @Composable () -> Unit? = null, buttonBlock: @Composable () -> Unit? = null, onSearchQueryChanged: (String) -> Unit? = null, onSearch: (String) -> Unit? = null, onDismiss: () -> Unit)

DHIS2 BottomSheetShell. Wraps compose · ModalBottomSheet. desktop version to be implemented

Parameters

uiState

UI data class of type BottomSheetShellUIState with all the values for the ui elements used in the component.

windowInsets

: The insets to use for the bottom sheet shell.

icon

: the icon to be shown.

buttonBlock

: Space for the lower buttons, use together with BottomSheetShellDefaults button block padding to ensure a correct style is displayed.

content

: to be shown under the header.

contentScrollState

: Pass custom scroll state when content is scrollable. For example, pass configure it when using LazyColumn to Modifier.verticalScroll for content. If you want the content to be scrollable in desktop using the middle mouse button, the modifier Modifier.draggableList must be used.

onSearchQueryChanged

: Callback when search query is changed.

onSearch

: Callback when search action is triggered.

onDismiss

: gives access to the onDismiss event.

modifier

allows a modifier to be passed externally.


fun BottomSheetShell(content: @Composable () -> Unit?, title: String? = null, subtitle: String? = null, description: String? = null, searchQuery: String? = null, showSectionDivider: Boolean = true, contentScrollState: ScrollableState? = null, icon: @Composable () -> Unit? = null, buttonBlock: @Composable () -> Unit? = null, modifier: Modifier = Modifier, headerTextAlignment: TextAlign = TextAlign.Center, scrollableContainerMinHeight: Dp = Spacing0, scrollableContainerMaxHeight: Dp = InternalSizeValues.Size386, animateHeaderOnKeyboardAppearance: Boolean = true, onSearchQueryChanged: (String) -> Unit? = null, onSearch: (String) -> Unit? = null, onDismiss: () -> Unit)

Deprecated

Use the new BottomSheetShell with the new parameters

DHIS2 BottomSheetShell. Wraps compose · ModalBottomSheet. desktop version to be implemented

Need to override searchQuery, onSearchQueryChanged&onSearch in order to show the search bar. (TODO: We can add lint check for this)

Parameters

title

: title to be shown.

subtitle

: subTitle to be shown.

description

: PopUp description.

searchQuery

: Search query to be displayed in the search bar.

showSectionDivider

: whether to show the divider or not.

icon

: the icon to be shown.

buttonBlock

: Space for the lower buttons.

content

: to be shown under the header.

contentScrollState

: Pass custom scroll state when content is scrollable. For example, pass configure it when using LazyColumn to Modifier.verticalScroll for content.

onSearchQueryChanged

: Callback when search query is changed.

onSearch

: Callback when search action is triggered.

onDismiss

: gives access to the onDismiss event.

modifier

allows a modifier to be passed externally.

headerTextAlignment

Alignment for header text.

scrollableContainerMinHeight

: Min size for scrollable content.

scrollableContainerMaxHeight

: Max size for scrollable content.