Skip to content

Commit

Permalink
fix(MM-61209): mention badge incorrect theme color
Browse files Browse the repository at this point in the history
  • Loading branch information
rahimrahman committed Nov 4, 2024
1 parent 7eec0ff commit 0c98f9e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/components/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Props = {
};

export default function Badge({
borderColor,
borderColor: borderColorProp,
color,
visible = true,
type = 'Normal',
Expand Down Expand Up @@ -60,9 +60,15 @@ export default function Badge({
return null;
}

// @ts-expect-error: backgroundColor definitely exists
const {backgroundColor = rest.backgroundColor || theme.mentionBg, ...restStyle} =
const {

// @ts-expect-error: backgroundColor & borderColor definitely exist
backgroundColor = rest.backgroundColor || theme.mentionBg, borderColor: styleBorderColor,

...restStyle} =
StyleSheet.flatten(style) || {};

const borderColor = borderColorProp || styleBorderColor || theme.mentionBg;
const textColor = color || theme.mentionColor;
let lineHeight = Platform.select({android: 21, ios: 16.5});
let fontSize = 12;
Expand Down

0 comments on commit 0c98f9e

Please sign in to comment.