Skip to content

Commit

Permalink
fix: sync TouchableRipple prop types (callstack#3735)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarNestorov committed Mar 13, 2023
1 parent 7fd60e1 commit d2432f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/TouchableRipple/TouchableRipple.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,24 @@ import {
} from 'react-native';

import { useInternalTheme } from '../../core/theming';
import type { InternalTheme } from '../../types';
import type { ThemeProp } from '../../types';
import { getTouchableRippleColors } from './utils';

const ANDROID_VERSION_LOLLIPOP = 21;
const ANDROID_VERSION_PIE = 28;

type Props = React.ComponentProps<typeof Pressable> & {
export type Props = React.ComponentProps<typeof Pressable> & {
borderless?: boolean;
background?: PressableAndroidRippleConfig;
centered?: boolean;
disabled?: boolean;
onPress?: (e: GestureResponderEvent) => void | null;
onLongPress?: (e: GestureResponderEvent) => void;
rippleColor?: string;
underlayColor?: string;
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
theme: InternalTheme;
theme?: ThemeProp;
};

const TouchableRipple = ({
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"esnext",
"dom"
],
"moduleSuffixes": [".ios", ".native", ".android", ""],
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
Expand Down

0 comments on commit d2432f1

Please sign in to comment.