Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/secondaryButtonNativeColor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/expo': patch
---

Support the `secondaryButton` theme color for native components, so social/SSO buttons no longer inherit the page `background` color. Pairs with the corresponding clerk-ios change.
6 changes: 5 additions & 1 deletion packages/expo/app.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,10 @@ const withClerkAppleSignIn = config => {
* Accepts a `theme` prop pointing to a JSON file with optional keys:
* - colors: { primary, background, input, danger, success, warning,
* foreground, mutedForeground, primaryForeground, inputForeground,
* neutral, border, ring, muted, shadow } (hex color strings)
* neutral, border, ring, muted, secondaryButton, shadow } (hex color strings)
* `secondaryButton` is the fill for social/SSO (secondary) buttons;
* it defaults to the standard adaptive surface so a custom
* `background` does not bleed into the buttons.
* - darkColors: same keys as colors (for dark mode)
* - design: { fontFamily: string, borderRadius: number }
*
Expand All @@ -613,6 +616,7 @@ const VALID_COLOR_KEYS = [
'border',
'ring',
'muted',
'secondaryButton',
'shadow',
];

Expand Down
1 change: 1 addition & 0 deletions packages/expo/ios/ClerkViewFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ public final class ClerkViewFactory: ClerkViewFactoryProtocol {
neutral: dict["neutral"].flatMap { colorFromHex($0) } ?? ClerkTheme.Colors.defaultNeutralColor,
ring: dict["ring"].flatMap { colorFromHex($0) } ?? ClerkTheme.Colors.defaultRingColor,
muted: dict["muted"].flatMap { colorFromHex($0) } ?? ClerkTheme.Colors.defaultMutedColor,
secondaryButton: dict["secondaryButton"].flatMap { colorFromHex($0) } ?? ClerkTheme.Colors.defaultSecondaryButtonColor,
shadow: dict["shadow"].flatMap { colorFromHex($0) } ?? ClerkTheme.Colors.defaultShadowColor,
border: dict["border"].flatMap { colorFromHex($0) } ?? ClerkTheme.Colors.defaultBorderColor
)
Expand Down
Loading