Skip to content

Commit 514fbb3

Browse files
authored
Merge pull request #31906 from kubabutkiewicz/fix/Button-component-after-ts-migration
Fix/button component after ts migration
2 parents 5db665c + 7d5f796 commit 514fbb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Button/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {useIsFocused} from '@react-navigation/native';
12
import React, {ForwardedRef, useCallback} from 'react';
23
import {ActivityIndicator, GestureResponderEvent, StyleProp, TextStyle, View, ViewStyle} from 'react-native';
34
import {SvgProps} from 'react-native-svg';
@@ -110,7 +111,6 @@ type ButtonProps = (ButtonWithText | ChildrenProps) & {
110111

111112
/** Accessibility label for the component */
112113
accessibilityLabel?: string;
113-
isFocused: boolean;
114114
};
115115

116116
function Button(
@@ -149,7 +149,6 @@ function Button(
149149
shouldRemoveRightBorderRadius = false,
150150
shouldRemoveLeftBorderRadius = false,
151151
shouldEnableHapticFeedback = false,
152-
isFocused,
153152

154153
id = '',
155154
accessibilityLabel = '',
@@ -159,6 +158,7 @@ function Button(
159158
) {
160159
const theme = useTheme();
161160
const styles = useThemeStyles();
161+
const isFocused = useIsFocused();
162162

163163
const keyboardShortcutCallback = useCallback(
164164
(event?: GestureResponderEvent | KeyboardEvent) => {

0 commit comments

Comments
 (0)