fix(MM-61209): mention badge incorrect theme color (#8312)

* fix(MM-61209): mention badge incorrect theme color

* removed expect-error with proper typing
This commit is contained in:
Rahim Rahman 2024-11-05 06:25:34 -07:00 committed by GitHub
parent 7eec0ff44d
commit aa85f22729
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ type Props = {
};
export default function Badge({
borderColor,
borderColor: borderColorProp,
color,
visible = true,
type = 'Normal',
@ -60,9 +60,13 @@ export default function Badge({
return null;
}
// @ts-expect-error: backgroundColor definitely exists
const {backgroundColor = rest.backgroundColor || theme.mentionBg, ...restStyle} =
StyleSheet.flatten(style) || {};
const {
backgroundColor = rest.backgroundColor || theme.mentionBg,
borderColor: styleBorderColor,
...restStyle
} = (StyleSheet.flatten(style) || {}) as TextStyle;
const borderColor = borderColorProp || styleBorderColor || theme.mentionBg;
const textColor = color || theme.mentionColor;
let lineHeight = Platform.select({android: 21, ios: 16.5});
let fontSize = 12;