UNPKG

4.69 kBTypeScriptView Raw
1import * as React from 'react';
2import { TouchableWithoutFeedback, ViewStyle, StyleProp, GestureResponderEvent } from 'react-native';
3declare type Props = React.ComponentPropsWithRef<typeof TouchableWithoutFeedback> & {
4 /**
5 * Whether to render the ripple outside the view bounds.
6 */
7 borderless?: boolean;
8 /**
9 * Type of background drawabale to display the feedback (Android).
10 * https://reactnative.dev/docs/touchablenativefeedback#background
11 */
12 background?: Object;
13 /**
14 * Whether to start the ripple at the center (Web).
15 */
16 centered?: boolean;
17 /**
18 * Whether to prevent interaction with the touchable.
19 */
20 disabled?: boolean;
21 /**
22 * Function to execute on press. If not set, will cause the touchable to be disabled.
23 */
24 onPress?: (e: GestureResponderEvent) => void;
25 /**
26 * Function to execute on long press.
27 */
28 onLongPress?: (e: GestureResponderEvent) => void;
29 /**
30 * Color of the ripple effect (Android >= 5.0 and Web).
31 */
32 rippleColor?: string;
33 /**
34 * Color of the underlay for the highlight effect (Android < 5.0 and iOS).
35 */
36 underlayColor?: string;
37 /**
38 * Content of the `TouchableRipple`.
39 */
40 children: React.ReactNode;
41 style?: StyleProp<ViewStyle>;
42 /**
43 * @optional
44 */
45 theme: ReactNativePaper.Theme;
46};
47declare const _default: (React.ComponentClass<Pick<Props, "ref" | "style" | "children" | "onLayout" | "onPress" | "onLongPress" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled" | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered"> & {
48 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
49}, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
50 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: Props): JSX.Element;
51 /**
52 * Whether ripple effect is supported.
53 */
54 supported: boolean;
55}) | (React.FunctionComponent<Props> & {
56 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: Props): JSX.Element;
57 /**
58 * Whether ripple effect is supported.
59 */
60 supported: boolean;
61}), {}>) | (React.FunctionComponent<Pick<Props, "ref" | "style" | "children" | "onLayout" | "onPress" | "onLongPress" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled" | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered"> & {
62 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
63}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
64 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: Props): JSX.Element;
65 /**
66 * Whether ripple effect is supported.
67 */
68 supported: boolean;
69}) | (React.FunctionComponent<Props> & {
70 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: Props): JSX.Element;
71 /**
72 * Whether ripple effect is supported.
73 */
74 supported: boolean;
75}), {}>);
76export default _default;