Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): account badges no longer clip wide initials like WO #15908

Mergedvitalyiegorov(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/15908/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 27 additions and 23 deletions.

x
0 of 1 viewed, 1 left
27 additions and 23 deletionsapps/mobile/src/components/ProviderIcon.tsxModified
View file
@@ -177,34 +177,38 @@
<ProviderIcon iconUrl={props.iconUrl} provider={props.provider} size={props.size} />
</View>
{props.showBadge ? (
+ // A wide right-aligned box lets the badge fit its initials. Alone, an
+ // absolute badge is capped at the icon's width, which clips "WO".
<View
- className={props.accentColor ? undefined : "bg-card"}
- style={{
- position: "absolute",
- right: -3,
- bottom: -3,
- height: 12,
- minWidth: 12,
- paddingHorizontal: 2,
- borderRadius: 999,
- borderWidth: 1,
- borderColor: props.surfaceColor,
- backgroundColor: props.accentColor,
- alignItems: "center",
- justifyContent: "center",
- }}
+ pointerEvents="none"
+ style={{ position: "absolute", right: -3, bottom: -3, width: 32, alignItems: "flex-end" }}
- <Text
- className={props.accentColor ? undefined : "text-foreground-muted"}
+ <View
+ className={props.accentColor ? undefined : "bg-card"}
style={{