Skip to content

Commit 918aed1

Browse files
fix(mobile): tint T3 Chat dark prominent actions pink
1 parent 9884ddd commit 918aed1

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎apps/mobile/generated-uniwind-themes.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,8 @@
515515
--color-inline-skill-border: rgba(163, 0, 76, 0.42);
516516
--color-inline-skill-foreground: #f8f1f5;
517517
--color-primary: #a3004c;
518-
--color-prominent-action: #f9f8fb;
519-
--color-prominent-action-foreground: #1f1a24;
518+
--color-prominent-action: #fbd0e8;
519+
--color-prominent-action-foreground: #a3004c;
520520
--color-primary-foreground: #fbd0e8;
521521
--color-primary-text: #d07ea4;
522522
--color-primary-shadow: #000000;

‎apps/mobile/src/lib/mobileTheme.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,11 @@ describe("mobile themes", () => {
273273
).toBeGreaterThanOrEqual(4.5);
274274
expect(fill).toBe(
275275
variables[
276-
themeId === DEFAULT_MOBILE_THEME_ID || themeId === "t3-chat"
277-
? "--color-foreground"
278-
: "--color-primary"
276+
themeId === "t3-chat" && appearance === "dark"
277+
? "--color-primary-foreground"
278+
: themeId === DEFAULT_MOBILE_THEME_ID || themeId === "t3-chat"
279+
? "--color-foreground"
280+
: "--color-primary"
279281
],
280282
);
281283
}

‎apps/mobile/src/lib/mobileTheme.ts‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export function createMobileThemeVariables(
247247
colors: ThemeColors,
248248
appearance: MobileThemeAppearance,
249249
groupedCardColor = colors.surface,
250-
useAccentForActions = false,
250+
prominentAction: readonly [string, string] = [colors.text, colors.canvas],
251251
) {
252252
const c = nativeColors(colors);
253253
const groupedCard = themeColorToNativeColor(groupedCardColor);
@@ -300,10 +300,8 @@ export function createMobileThemeVariables(
300300
"--color-inline-skill-border": withAlpha(c.accent, 0.42),
301301
"--color-inline-skill-foreground": c.accentSurfaceForeground,
302302
"--color-primary": c.messageAction,
303-
"--color-prominent-action": useAccentForActions ? c.messageAction : c.text,
304-
"--color-prominent-action-foreground": useAccentForActions
305-
? c.messageActionForeground
306-
: c.canvas,
303+
"--color-prominent-action": themeColorToNativeColor(prominentAction[0]),
304+
"--color-prominent-action-foreground": themeColorToNativeColor(prominentAction[1]),
307305
"--color-primary-foreground": c.messageActionForeground,
308306
"--color-primary-text": themeColorWithContrast(c.messageAction, textSurfaces),
309307
"--color-primary-shadow": "#000000",
@@ -420,7 +418,11 @@ export function getMobileThemeVariables(
420418
mobileColors,
421419
appearance,
422420
groupedCard,
423-
themeId !== DEFAULT_MOBILE_THEME_ID && themeId !== "t3-chat",
421+
themeId === "t3-chat" && appearance === "dark"
422+
? [colors.messageActionForeground, colors.messageAction]
423+
: themeId !== DEFAULT_MOBILE_THEME_ID && themeId !== "t3-chat"
424+
? [colors.messageAction, colors.messageActionForeground]
425+
: undefined,
424426
);
425427

426428
// The complete base record guarantees that optional overrides cannot leave a token undefined.

0 commit comments

Comments
 (0)