diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateButton.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateButton.kt index 505849c9191..b271986c4bc 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateButton.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/paymentdatacollection/bacs/BacsMandateButton.kt @@ -9,6 +9,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import com.stripe.android.common.ui.PrimaryButton +import com.stripe.android.uicore.StripeTheme +import com.stripe.android.uicore.getComposeTextStyle @Composable internal fun BacsMandateButton(type: BacsMandateButtonType, label: String, onClick: () -> Unit) { @@ -18,16 +20,26 @@ internal fun BacsMandateButton(type: BacsMandateButtonType, label: String, onCli isEnabled = true, onButtonClick = onClick ) - BacsMandateButtonType.Secondary -> TextButton( - modifier = Modifier.fillMaxWidth(), - shape = MaterialTheme.shapes.small, - colors = ButtonDefaults.buttonColors( - backgroundColor = Color.Transparent, - contentColor = MaterialTheme.colors.primary - ), - onClick = onClick - ) { - Text(text = label) + BacsMandateButtonType.Secondary -> { + // Use the same text style as the primary button but a different color. + val textStyle = StripeTheme.primaryButtonStyle.getComposeTextStyle().copy( + color = MaterialTheme.colors.primary + ) + + TextButton( + modifier = Modifier.fillMaxWidth(), + shape = MaterialTheme.shapes.small, + colors = ButtonDefaults.buttonColors( + backgroundColor = Color.Transparent, + contentColor = MaterialTheme.colors.primary + ), + onClick = onClick + ) { + Text( + text = label, + style = textStyle + ) + } } } } diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,DefaultFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,DefaultFont].png index efe599cd885..32e900116ae 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,DefaultFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,DefaultFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,LargeFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,LargeFont].png index a272a764a77..afc386a948f 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,LargeFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CrazyAppearance,LargeFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,DefaultFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,DefaultFont].png index 53ed8173ccb..4e5e33ae89f 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,DefaultFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,DefaultFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,LargeFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,LargeFont].png index 890ad07a187..4409f951417 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,LargeFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,CustomAppearance,LargeFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,DefaultFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,DefaultFont].png index 590ca45a63b..b460de30eb7 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,DefaultFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,DefaultFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,LargeFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,LargeFont].png index 5a08045c8ea..124fc665294 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,LargeFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[DarkTheme,DefaultAppearance,LargeFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,DefaultFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,DefaultFont].png index efe599cd885..32e900116ae 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,DefaultFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,DefaultFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,LargeFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,LargeFont].png index a272a764a77..afc386a948f 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,LargeFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CrazyAppearance,LargeFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,DefaultFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,DefaultFont].png index 6d2d9d6ccab..19e9ff433bd 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,DefaultFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,DefaultFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,LargeFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,LargeFont].png index 53d14fe2229..05f05b53332 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,LargeFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,CustomAppearance,LargeFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,DefaultFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,DefaultFont].png index c8671e2b428..d7a968e0479 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,DefaultFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,DefaultFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,LargeFont].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,LargeFont].png index 6407cdff19b..d72abe40bf8 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,LargeFont].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateButtonScreenshotTest_testSecondary[LightTheme,DefaultAppearance,LargeFont].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateConfirmationFormScreenshotTest_testFullForm[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateConfirmationFormScreenshotTest_testFullForm[].png index 5fc3e67cb00..b29459e6c44 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateConfirmationFormScreenshotTest_testFullForm[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.paymentdatacollection.bacs_BacsMandateConfirmationFormScreenshotTest_testFullForm[].png differ