diff --git a/changelog.md b/changelog.md index 19011d2dc..c7084d5b5 100644 --- a/changelog.md +++ b/changelog.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - \[Lib\] Update `OdsTab`, `OdsLeadingIconTab`, `OdsTabRow` and `OdsScrollableTabRow` APIs ([#675](https://github.com/Orange-OpenSource/ods-android/issues/675)) - \[Lib\] Update `OdsTextField`, `OdsPasswordTextField` and `OdsSearchTextField` APIs ([#676](https://github.com/Orange-OpenSource/ods-android/issues/676)) - \[Lib\] Update `OdsModalDrawer` API ([#677](https://github.com/Orange-OpenSource/ods-android/issues/677)) +- \[Lib\] Update `OdsBottomSheetScaffold` documentation ([#678](https://github.com/Orange-OpenSource/ods-android/issues/678)) ### Fixed diff --git a/docs/components/SheetsBottom.md b/docs/components/SheetsBottom.md index a80fa5bf4..bccdb8982 100644 --- a/docs/components/SheetsBottom.md +++ b/docs/components/SheetsBottom.md @@ -15,6 +15,7 @@ Use Sheets bottom to: * [Accessibility](#accessibility) * [Implementation](#implementation) * [Jetpack Compose](#jetpack-compose) + * [OdsBottomSheetScaffold API](#odsbottomsheetscaffold-api-) --- @@ -53,3 +54,19 @@ OdsBottomSheetScaffold( } ) ``` + +#### OdsBottomSheetScaffold API [#](#odsbottomsheetscaffold-api-) + +Parameter | Default value | Description +-- | -- | -- +`sheetContent: @Composable ColumnScope.() -> Unit` | | Content of the bottom sheet +`modifier: Modifier` | `Modifier` | `Modifier` applied to the bottom sheet scaffold +`scaffoldState: BottomSheetScaffoldState` | `rememberBottomSheetScaffoldState()` | State of the scaffold +`topBar: (@Composable () -> Unit)?` | `null` | Top app bar displayed in the scaffold +`snackbarHost: @Composable (SnackbarHostState) -> Unit` | `{ SnackbarHost(it) }` | Composable hosting the snackbars shown inside the scaffold +`floatingActionButton: (@Composable () -> Unit)?` | `null` | Floating action button displayed in the scaffold +`floatingActionButtonPosition: FabPosition` | `FabPosition.End`| Position of the floating action button +`sheetGesturesEnabled: Boolean` | `true` | Whether the bottom sheet can be interacted with by gestures +`sheetPeekHeight: Dp` | `BottomSheetScaffoldDefaults.SheetPeekHeight` | Height of the bottom sheet when it is collapsed +`content: @Composable (PaddingValues) -> Unit` | | Content of the screen +{:.table} diff --git a/lib/src/main/java/com/orange/ods/compose/component/bottomsheet/OdsBottomSheetScaffold.kt b/lib/src/main/java/com/orange/ods/compose/component/bottomsheet/OdsBottomSheetScaffold.kt index 9c73f620f..f37919161 100644 --- a/lib/src/main/java/com/orange/ods/compose/component/bottomsheet/OdsBottomSheetScaffold.kt +++ b/lib/src/main/java/com/orange/ods/compose/component/bottomsheet/OdsBottomSheetScaffold.kt @@ -32,16 +32,16 @@ import com.orange.ods.compose.theme.OdsTheme * * Bottom Sheets are surfaces anchored to the bottom of the screen that present users supplement content. * - * @param sheetContent The content of the bottom sheet. - * @param modifier optional [Modifier] for this OdsBottomSheetScaffold. - * @param scaffoldState The state of the scaffold. - * @param topBar An optional top app bar. - * @param snackbarHost The composable hosting the snackbars shown inside the scaffold. - * @param floatingActionButton An optional floating action button. - * @param floatingActionButtonPosition The position of the floating action button. + * @param sheetContent Content of the bottom sheet. + * @param modifier [Modifier] applied to this bottom sheet scaffold. + * @param scaffoldState State of the scaffold. + * @param topBar Top app bar displayed in the scaffold. + * @param snackbarHost Composable hosting the snackbars shown inside the scaffold. + * @param floatingActionButton Floating action button displayed in the scaffold. + * @param floatingActionButtonPosition Position of the floating action button. * @param sheetGesturesEnabled Whether the bottom sheet can be interacted with by gestures. - * @param sheetPeekHeight The height of the bottom sheet when it is collapsed. - * @param content destinations inside this OdsBottomSheetScaffold. + * @param sheetPeekHeight Height of the bottom sheet when it is collapsed. + * @param content Content of the screen. */ @Composable @ExperimentalMaterialApi @@ -73,4 +73,4 @@ fun OdsBottomSheetScaffold( contentColor = OdsTheme.colors.onSurface, content = content ) -} \ No newline at end of file +}