Skip to content

Commit

Permalink
Add colorScheme and typography to BvnConsentScreen (#231)
Browse files Browse the repository at this point in the history
* Add colorScheme and typography to BvnConsentScreen

* fix formatting
  • Loading branch information
vanshg authored Oct 17, 2023
1 parent 2e4d846 commit 2f5c161
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 10.0.0-beta09 (unreleased)

### Added
- Added missing `colorScheme` and `typography` parameters on `SmileID.BvnConsentScreen`

### Fixed
- Updated KDocs with missing parameter descriptions
Expand Down
12 changes: 9 additions & 3 deletions lib/src/main/java/com/smileidentity/compose/SmileIDExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,15 @@ fun SmileID.BiometricKYC(
* @param partnerIcon Your own icon to display on the BVN Consent screen (i.e. company logo)
* @param partnerName Your own name to display on the BVN Consent screen (i.e. company name)
* @param partnerPrivacyPolicy A link to your own privacy policy to display
* @param onConsentGranted Callback to be invoked when the BVN verification job is complete.
* @param onConsentDenied Callback to be invoked when the user denies consent to BVN verification.
* @param showAttribution Whether to show the Smile ID attribution or not on the Instructions screen
* @param userId The user ID to associate with the BVN Job. Most often, this will correspond
* to a unique User ID within your own system. If not provided, a random user ID will be generated
* @param onConsentDenied Callback to be invoked when the user denies consent to BVN verification.
* @param onConsentGranted Callback to be invoked when the BVN verification job is
* complete.
* @param colorScheme The color scheme to use for the UI. This is passed in so that we show a Smile
* ID branded UI by default, but allow the user to override it if they want.
* @param typography The typography to use for the UI. This is passed in so that we show a Smile ID
* branded UI by default, but allow the user to override it if they want.
*/
@Composable
fun SmileID.BvnConsentScreen(
Expand All @@ -259,6 +263,8 @@ fun SmileID.BvnConsentScreen(
onConsentDenied: () -> Unit,
showAttribution: Boolean = true,
userId: String = rememberSaveable { randomUserId() },
colorScheme: ColorScheme = SmileID.colorScheme,
typography: Typography = SmileID.typography,
) {
MaterialTheme(colorScheme = colorScheme, typography = typography) {
OrchestratedBvnConsentScreen(
Expand Down

0 comments on commit 2f5c161

Please sign in to comment.