Skip to content

Commit

Permalink
Remove circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bert committed Feb 19, 2025
1 parent 5ad18eb commit 8b338fb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 7 additions & 0 deletions src/components/touchables/ExtraButtonProps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type ExtraButtonProps = {
borderless?: boolean;
rippleColor?: number | string | null;
rippleRadius?: number | null;
foreground?: boolean;
exclusive?: boolean;
};
4 changes: 2 additions & 2 deletions src/components/touchables/GenericTouchableProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
Insets,
} from 'react-native';
import type { UserSelect } from '../../handlers/gestureHandlerCommon';
import type { TouchableNativeFeedbackExtraProps } from './TouchableNativeFeedbackProps';
import { ExtraButtonProps } from './ExtraButtonProps';

export interface GenericTouchableProps
extends Omit<TouchableWithoutFeedbackProps, 'hitSlop'> {
Expand All @@ -24,5 +24,5 @@ export interface GenericTouchableProps
containerStyle?: StyleProp<ViewStyle>;
hitSlop?: Insets | number;
userSelect?: UserSelect;
extraButtonProps?: TouchableNativeFeedbackExtraProps;
extraButtonProps?: ExtraButtonProps;
}
10 changes: 2 additions & 8 deletions src/components/touchables/TouchableNativeFeedbackProps.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import type { TouchableNativeFeedbackProps as RNTouchableNativeFeedbackProps } from 'react-native';
import type { GenericTouchableProps } from './GenericTouchableProps';
import { ExtraButtonProps } from './ExtraButtonProps';

export type TouchableNativeFeedbackExtraProps = {
borderless?: boolean;
rippleColor?: number | string | null;
rippleRadius?: number | null;
foreground?: boolean;
exclusive?: boolean;
};

export type TouchableNativeFeedbackExtraProps = ExtraButtonProps;
/**
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
*/
Expand Down

0 comments on commit 8b338fb

Please sign in to comment.