Skip to content

Commit

Permalink
shouldShowDefaultBadge no default value
Browse files Browse the repository at this point in the history
  • Loading branch information
tianzhao-stripe committed Jan 8, 2025
1 parent a01b73c commit 1b868c5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal fun PaymentMethodRowButton(
isEnabled: Boolean,
isSelected: Boolean,
isClickable: Boolean = isEnabled,
shouldShowDefaultBadge: Boolean = false,
shouldShowDefaultBadge: Boolean,
iconContent: @Composable RowScope.() -> Unit,
title: String,
subtitle: String?,
Expand Down Expand Up @@ -279,7 +279,7 @@ private fun RowButtonCheckmarkOuterContent(
@Composable
private fun RowButtonInnerContent(
isEnabled: Boolean,
shouldShowDefaultBadge: Boolean = false,
shouldShowDefaultBadge: Boolean,
iconContent: @Composable RowScope.() -> Unit,
title: String,
subtitle: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
subtitle = null,
promoText = null,
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -63,6 +64,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
subtitle = null,
promoText = null,
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -83,6 +85,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
subtitle = null,
promoText = null,
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -103,6 +106,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
subtitle = "Please click me, I'm fancy",
promoText = null,
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -124,6 +128,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
"forever.",
promoText = null,
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -146,7 +151,8 @@ internal class PaymentMethodRowButtonScreenshotTest {
onClick = {},
trailingContent = {
Text(text = "View more")
}
},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -167,6 +173,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
subtitle = null,
promoText = "$5",
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -187,6 +194,7 @@ internal class PaymentMethodRowButtonScreenshotTest {
subtitle = null,
promoText = "$5",
onClick = {},
shouldShowDefaultBadge = false,
)
}
}
Expand Down Expand Up @@ -214,7 +222,8 @@ internal class PaymentMethodRowButtonScreenshotTest {
style = style,
trailingContent = {
Text(text = "View more")
}
},
shouldShowDefaultBadge = false,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
subtitle = null,
promoText = null,
onClick = {},
style = FlatWithCheckmark.defaultLight
style = FlatWithCheckmark.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -66,6 +67,7 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithCheckmark.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -87,6 +89,7 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithCheckmark.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -108,6 +111,7 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithCheckmark.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -130,6 +134,7 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithCheckmark.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -153,7 +158,8 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
style = FlatWithCheckmark.defaultLight,
trailingContent = {
Text(text = "View more")
}
},
shouldShowDefaultBadge = false,
)
}
}
Expand Down Expand Up @@ -187,7 +193,8 @@ internal class PaymentMethodRowCheckmarkButtonScreenshotTest {
style = style,
trailingContent = {
Text(text = "View more")
}
},
shouldShowDefaultBadge = false,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
subtitle = null,
promoText = null,
onClick = {},
style = FlatWithRadio.defaultLight
style = FlatWithRadio.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -66,6 +67,7 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithRadio.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -87,6 +89,7 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithRadio.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -108,6 +111,7 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithRadio.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -130,6 +134,7 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
promoText = null,
onClick = {},
style = FlatWithRadio.defaultLight,
shouldShowDefaultBadge = false,
)
}
}
Expand All @@ -153,7 +158,8 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
style = FlatWithRadio.defaultLight,
trailingContent = {
Text(text = "View more")
}
},
shouldShowDefaultBadge = false,
)
}
}
Expand Down Expand Up @@ -187,7 +193,8 @@ internal class PaymentMethodRowRadioButtonScreenshotTest {
style = style,
trailingContent = {
Text(text = "View more")
}
},
shouldShowDefaultBadge = false,
)
}
}
Expand Down

0 comments on commit 1b868c5

Please sign in to comment.