/** * @see https://github.com/callstack/react-native-paper/tree/master/src/components/TouchableRipple */ import React from 'react'; import { TouchableWithoutFeedback, ViewStyle, StyleProp, GestureResponderEvent } from 'react-native'; declare type Props = React.ComponentPropsWithRef & { /** * Whether to render the ripple outside the view bounds. */ borderless?: boolean; /** * Type of background drawabale to display the feedback (Android). * https://facebook.github.io/react-native/docs/touchablenativefeedback.html#background */ background?: Object; /** * Whether to start the ripple at the center (Web). */ centered?: boolean; /** * Whether to prevent interaction with the touchable. */ disabled?: boolean; /** * Function to execute on press. If not set, will cause the touchable to be disabled. */ onPress?: (e: GestureResponderEvent) => void; /** * Function to execute on long press. */ onLongPress?: (e: GestureResponderEvent) => void; /** * Color of the ripple effect (Android >= 5.0 and Web). */ rippleColor?: string; /** * Color of the underlay for the highlight effect (Android < 5.0 and iOS). */ underlayColor?: string; /** * Content of the `TouchableRipple`. */ children: React.ReactElement; style?: StyleProp; hoverable?: boolean; onHoverIn?: () => void; onHoverOut?: () => void; }; /** * A wrapper for views that should respond to touches. * Provides a material "ink ripple" interaction effect for supported platforms (>= Android Lollipop). * On unsupported platforms, it falls back to a highlight effect. * *
*
* *
*
* * ## Usage * ```js * import * as React from 'react'; * import { View } from 'react-native'; * import { Text, TouchableRipple } from 'react-native-paper'; * * const MyComponent = () => ( * console.log('Pressed')} * rippleColor="rgba(0, 0, 0, .32)" * > * Press anywhere * * ); * * export default MyComponent; * ``` * * @extends TouchableWithoutFeedback props https://reactnative.dev/docs/touchablewithoutfeedback#props */ export declare const Tappable: { ({ style: styleName, background: _background, borderless, disabled, rippleColor, underlayColor: _underlayColor, children, hoverable, onHoverIn, onHoverOut, ...rest }: Props): JSX.Element; /** * Whether ripple effect is supported. */ supported: boolean; }; export {};