Skip to content

Commit 5fb8df2

Browse files
Updates colors.
1 parent 297d924 commit 5fb8df2

File tree

3 files changed

+168
-152
lines changed

3 files changed

+168
-152
lines changed

paymentsheet/src/main/java/com/stripe/android/link/ui/verification/VerificationBody.kt

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import androidx.compose.material.CircularProgressIndicator
1818
import androidx.compose.material.ContentAlpha
1919
import androidx.compose.material.Icon
2020
import androidx.compose.material.IconButton
21-
import androidx.compose.material.MaterialTheme
2221
import androidx.compose.material.Text
2322
import androidx.compose.runtime.Composable
2423
import androidx.compose.runtime.LaunchedEffect
@@ -36,9 +35,8 @@ import androidx.compose.ui.res.stringResource
3635
import androidx.compose.ui.text.style.TextAlign
3736
import androidx.compose.ui.text.style.TextOverflow
3837
import androidx.compose.ui.unit.dp
38+
import com.stripe.android.link.theme.LinkTheme
3939
import com.stripe.android.link.theme.StripeThemeForLink
40-
import com.stripe.android.link.theme.linkColors
41-
import com.stripe.android.link.theme.linkShapes
4240
import com.stripe.android.link.ui.ErrorText
4341
import com.stripe.android.link.ui.ScrollableTopLevelColumn
4442
import com.stripe.android.link.utils.LINK_DEFAULT_ANIMATION_DELAY_MILLIS
@@ -107,8 +105,8 @@ internal fun VerificationBody(
107105
.testTag(VERIFICATION_SUBTITLE_TAG)
108106
.fillMaxWidth(),
109107
textAlign = TextAlign.Companion.Center,
110-
style = MaterialTheme.typography.body1,
111-
color = MaterialTheme.colors.onSecondary
108+
style = LinkTheme.typography.body,
109+
color = LinkTheme.colors.textSecondary
112110
)
113111

114112
Spacer(modifier = Modifier.size(24.dp))
@@ -120,12 +118,12 @@ internal fun VerificationBody(
120118
middleSpacing = 8.dp,
121119
boxSpacing = 8.dp,
122120
otpInputPlaceholder = " ",
123-
boxShape = MaterialTheme.linkShapes.large,
121+
boxShape = LinkTheme.shapes.large,
124122
modifier = Modifier
125123
// 48dp per OTP box plus 8dp per space
126124
.width(328.dp)
127125
.testTag(VERIFICATION_OTP_TAG),
128-
colors = MaterialTheme.linkColors.otpElementColors,
126+
colors = LinkTheme.colors.otpElementColors,
129127
focusRequester = focusRequester
130128
)
131129
}
@@ -230,8 +228,8 @@ private fun Header(
230228
modifier = Modifier
231229
.testTag(VERIFICATION_TITLE_TAG),
232230
textAlign = TextAlign.Companion.Center,
233-
style = MaterialTheme.typography.h2,
234-
color = MaterialTheme.colors.onPrimary
231+
style = LinkTheme.typography.title,
232+
color = LinkTheme.colors.textPrimary
235233
)
236234
} else {
237235
Text(
@@ -240,8 +238,8 @@ private fun Header(
240238
.testTag(VERIFICATION_TITLE_TAG)
241239
.padding(vertical = 4.dp),
242240
textAlign = TextAlign.Companion.Center,
243-
style = MaterialTheme.typography.h2,
244-
color = MaterialTheme.colors.onPrimary
241+
style = LinkTheme.typography.title,
242+
color = LinkTheme.colors.textPrimary
245243
)
246244
}
247245
}
@@ -258,10 +256,10 @@ private fun ChangeEmailRow(
258256
Text(
259257
text = email,
260258
modifier = Modifier.weight(weight = 1f, fill = false),
261-
color = MaterialTheme.colors.onSecondary,
259+
color = LinkTheme.colors.textSecondary,
262260
overflow = TextOverflow.Companion.Ellipsis,
263261
maxLines = 1,
264-
style = MaterialTheme.typography.body2
262+
style = LinkTheme.typography.body
265263
)
266264
Text(
267265
text = stringResource(id = R.string.stripe_verification_change_email_new),
@@ -272,9 +270,9 @@ private fun ChangeEmailRow(
272270
enabled = !isProcessing,
273271
onClick = onChangeEmailClick
274272
),
275-
color = MaterialTheme.linkColors.textBrand,
273+
color = LinkTheme.colors.actionLabel,
276274
maxLines = 1,
277-
style = MaterialTheme.typography.body2
275+
style = LinkTheme.typography.body
278276
)
279277
}
280278
}
@@ -304,8 +302,8 @@ private fun ResendCodeButton(
304302

305303
Text(
306304
text = stringResource(id = R.string.stripe_verification_resend),
307-
style = MaterialTheme.typography.button,
308-
color = MaterialTheme.linkColors.textBrand,
305+
style = LinkTheme.typography.bodyEmphasized,
306+
color = LinkTheme.colors.actionLabel,
309307
modifier = Modifier
310308
.alpha(textAlpha),
311309
)
@@ -314,7 +312,7 @@ private fun ResendCodeButton(
314312
visible = isSendingNewCode
315313
) {
316314
CircularProgressIndicator(
317-
color = MaterialTheme.linkColors.textBrand,
315+
color = LinkTheme.colors.actionLabel,
318316
strokeWidth = 2.dp,
319317
modifier = Modifier
320318
.testTag(VERIFICATION_RESEND_LOADER_TAG)

0 commit comments

Comments
 (0)