diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 02f743b6a1b6..71bce9777174 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -1,3 +1,4 @@ +import {useIsFocused} from '@react-navigation/native'; import React, {ForwardedRef, useCallback} from 'react'; import {ActivityIndicator, GestureResponderEvent, StyleProp, TextStyle, View, ViewStyle} from 'react-native'; import {SvgProps} from 'react-native-svg'; @@ -110,7 +111,6 @@ type ButtonProps = (ButtonWithText | ChildrenProps) & { /** Accessibility label for the component */ accessibilityLabel?: string; - isFocused: boolean; }; function Button( @@ -149,7 +149,6 @@ function Button( shouldRemoveRightBorderRadius = false, shouldRemoveLeftBorderRadius = false, shouldEnableHapticFeedback = false, - isFocused, id = '', accessibilityLabel = '', @@ -159,6 +158,7 @@ function Button( ) { const theme = useTheme(); const styles = useThemeStyles(); + const isFocused = useIsFocused(); const keyboardShortcutCallback = useCallback( (event?: GestureResponderEvent | KeyboardEvent) => {