Skip to content

Commit d2432f1

Browse files
fix: sync TouchableRipple prop types (#3735)
1 parent 7fd60e1 commit d2432f1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/TouchableRipple/TouchableRipple.native.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ import {
1010
} from 'react-native';
1111

1212
import { useInternalTheme } from '../../core/theming';
13-
import type { InternalTheme } from '../../types';
13+
import type { ThemeProp } from '../../types';
1414
import { getTouchableRippleColors } from './utils';
1515

1616
const ANDROID_VERSION_LOLLIPOP = 21;
1717
const ANDROID_VERSION_PIE = 28;
1818

19-
type Props = React.ComponentProps<typeof Pressable> & {
19+
export type Props = React.ComponentProps<typeof Pressable> & {
2020
borderless?: boolean;
2121
background?: PressableAndroidRippleConfig;
22+
centered?: boolean;
2223
disabled?: boolean;
2324
onPress?: (e: GestureResponderEvent) => void | null;
25+
onLongPress?: (e: GestureResponderEvent) => void;
2426
rippleColor?: string;
2527
underlayColor?: string;
2628
children: React.ReactNode;
2729
style?: StyleProp<ViewStyle>;
28-
theme: InternalTheme;
30+
theme?: ThemeProp;
2931
};
3032

3133
const TouchableRipple = ({

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"esnext",
1717
"dom"
1818
],
19+
"moduleSuffixes": [".ios", ".native", ".android", ""],
1920
"module": "esnext",
2021
"moduleResolution": "node",
2122
"noFallthroughCasesInSwitch": true,

0 commit comments

Comments
 (0)