import * as React from "react"; import { ViewStyle, StyleProp, GestureResponderEvent, Pressable } from "react-native"; import { DefaultTheme } from "styled-components"; 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://reactnative.dev/docs/touchablenativefeedback#background */ background?: Record; /** * 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.ReactNode; focusedStyle?: StyleProp; hoveredStyle?: StyleProp; pressedStyle?: StyleProp; style?: StyleProp; /** * @optional */ theme?: DefaultTheme; }; /** * 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 TouchableRipple from 'react-native-simple-elements/components/TouchableRipple'; * import Text from "react-native-simple-elements/components/Text"; * * 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 */ declare const TouchableRipple: { ({ style, focusedStyle, hoveredStyle, pressedStyle, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, ...rest }: Props): JSX.Element; /** * Whether ripple effect is supported. */ supported: boolean; }; export default TouchableRipple;