disable font scaling on fixed-height chat invite cards

thread a hasFixedHeight flag through ChatInvite.Root and its context so
the card, join button, and profile badges disable font scaling when they
live in a fixed-height container, preventing text from overflowing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-06-05 14:41:10 +03:00
parent 96e321dfd9
commit ce7ad9b6fa
10 changed files with 42 additions and 23 deletions
+3 -1
View File
@@ -23,6 +23,7 @@ export function Text({
title,
dataSet,
numberOfLines,
allowFontScaling = true,
...rest
}: TextProps) {
const {fonts, flags} = useAlf()
@@ -36,7 +37,7 @@ export function Text({
style,
],
{
fontScale: fonts.scaleMultiplier,
fontScale: allowFontScaling ? fonts.scaleMultiplier : 1,
fontFamily: fonts.family,
flags,
},
@@ -57,6 +58,7 @@ export function Text({
numberOfLines,
style: s,
dataSet: Object.assign({tooltip: title}, dataSet || {}),
allowFontScaling,
...rest,
}