diff --git a/src/components/Pressable/PressableWithoutFeedback.tsx b/src/components/Pressable/PressableWithoutFeedback.tsx index 82c6eb764186..cdd2762adfe4 100644 --- a/src/components/Pressable/PressableWithoutFeedback.tsx +++ b/src/components/Pressable/PressableWithoutFeedback.tsx @@ -4,7 +4,7 @@ import type {PressableRef} from './GenericPressable/types'; import type PressableProps from './GenericPressable/types'; function PressableWithoutFeedback( - {pressStyle, hoverStyle, focusStyle, screenReaderActiveStyle, shouldUseHapticsOnPress, shouldUseHapticsOnLongPress = false, ...rest}: PressableProps, + {pressStyle, focusStyle, screenReaderActiveStyle, shouldUseHapticsOnPress, shouldUseHapticsOnLongPress = false, ...rest}: PressableProps, ref: PressableRef, ) { return ( diff --git a/src/components/RadioButtonWithLabel.tsx b/src/components/RadioButtonWithLabel.tsx index d51c8102b0b2..824660d631af 100644 --- a/src/components/RadioButtonWithLabel.tsx +++ b/src/components/RadioButtonWithLabel.tsx @@ -32,11 +32,17 @@ type RadioButtonWithLabelProps = { /** Additional styles to apply to the wrapper */ wrapperStyle?: StyleProp; + + /** + * Whether the button should have a background layer in the color of theme.appBG. + * This is needed for buttons that allow content to display under them. + */ + shouldBlendOpacity?: boolean; }; const PressableWithFeedback = Pressables.PressableWithFeedback; -function RadioButtonWithLabel({labelElement, style, label = '', hasError = false, errorText = '', isChecked, onPress, wrapperStyle}: RadioButtonWithLabelProps) { +function RadioButtonWithLabel({labelElement, style, label = '', hasError = false, errorText = '', isChecked, onPress, wrapperStyle, shouldBlendOpacity}: RadioButtonWithLabelProps) { const styles = useThemeStyles(); const defaultStyles = [styles.flexRow, styles.alignItemsCenter]; @@ -61,6 +67,7 @@ function RadioButtonWithLabel({labelElement, style, label = '', hasError = false // disable hover style when disabled hoverDimmingValue={0.8} pressDimmingValue={0.5} + shouldBlendOpacity={shouldBlendOpacity} > {!!label && {label}} {!!labelElement && labelElement} diff --git a/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx b/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx index 57b648e733af..f7ad4510fca6 100644 --- a/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx +++ b/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx @@ -275,7 +275,8 @@ function BaseOnboardingAccounting({shouldUseNativeStyles}: BaseOnboardingAccount onPress={() => handleIntegrationSelect(item.keyForList)} accessibilityLabel={item.text} accessible={false} - style={[styles.onboardingAccountingItem, isSmallScreenWidth && styles.flexBasis100]} + hoverStyle={!item.isSelected ? styles.hoveredComponentBG : undefined} + style={[styles.onboardingAccountingItem, isSmallScreenWidth && styles.flexBasis100, item.isSelected && styles.activeComponentBG]} > {item.text} } + shouldBlendOpacity /> ), @@ -301,6 +303,8 @@ function BaseOnboardingAccounting({shouldUseNativeStyles}: BaseOnboardingAccount styles.ml0, styles.onboardingAccountingItem, styles.textStrong, + styles.hoveredComponentBG, + styles.activeComponentBG, ], );