Skip to content

Commit

Permalink
Merge pull request #688 from Orange-OpenSource/678-update-odsbottomsh…
Browse files Browse the repository at this point in the history
…eetscaffold-api

678 - Update OdsBottomSheetScaffold API
  • Loading branch information
florentmaitre authored Nov 8, 2023
2 parents 4120522 + d719fba commit 57ce81e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 17 additions & 0 deletions docs/components/SheetsBottom.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Use Sheets bottom to:
* [Accessibility](#accessibility)
* [Implementation](#implementation)
* [Jetpack Compose](#jetpack-compose)
* [OdsBottomSheetScaffold API](#odsbottomsheetscaffold-api-)

---

Expand Down Expand Up @@ -53,3 +54,19 @@ OdsBottomSheetScaffold(
}
)
```

#### OdsBottomSheetScaffold API [#](#odsbottomsheetscaffold-api-)

Parameter | Default value | Description
-- | -- | --
<b>`sheetContent: @Composable ColumnScope.() -> Unit`</b> | | 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
<b>`content: @Composable (PaddingValues) -> Unit`</b> | | Content of the screen
{:.table}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -73,4 +73,4 @@ fun OdsBottomSheetScaffold(
contentColor = OdsTheme.colors.onSurface,
content = content
)
}
}

0 comments on commit 57ce81e

Please sign in to comment.