diff --git a/src/components/Badge.tsx b/src/components/Badge.tsx index 635645b0035b..b23d02cd7685 100644 --- a/src/components/Badge.tsx +++ b/src/components/Badge.tsx @@ -41,6 +41,9 @@ type BadgeProps = { /** Any additional styles to pass to the left icon container. */ iconStyles?: StyleProp; + + /** Additional styles from OfflineWithFeedback applied to the row */ + style?: StyleProp; }; function Badge({ @@ -54,6 +57,7 @@ function Badge({ onPress = () => {}, icon, iconStyles = [], + style, }: BadgeProps) { const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); @@ -61,6 +65,8 @@ function Badge({ const textColorStyles = success || error ? styles.textWhite : undefined; const Wrapper = pressable ? PressableWithoutFeedback : View; + const isDeleted = style && Array.isArray(style) ? style.includes(styles.offlineFeedback.deleted) : false; + const wrapperStyles: (state: PressableStateCallbackType) => StyleProp = useCallback( ({pressed}) => [styles.badge, styles.ml2, StyleUtils.getBadgeColorStyle(success, error, pressed, environment === CONST.ENVIRONMENT.ADHOC), badgeStyles], [styles.badge, styles.ml2, StyleUtils, success, error, environment, badgeStyles], @@ -86,7 +92,7 @@ function Badge({ )} {text}