react-native-pressable-opacity
Version:
A <PressableOpacity> and a supercharged <NativePressableOpacity> components for React Native
19 lines (18 loc) • 701 B
TypeScript
import React from 'react';
import { PressableProps, PressableStateCallbackType, StyleProp, ViewStyle } from 'react-native';
export interface PressableOpacityProps extends PressableProps {
/**
* The opacity to use when `disabled={true}`
*
* @default 0.3
*/
disabledOpacity?: number;
/**
* The opacity to animate to when the user presses the button
*
* @default 0.2
*/
activeOpacity?: number;
}
export declare type StyleType = (state: PressableStateCallbackType) => StyleProp<ViewStyle>;
export declare function PressableOpacity({ style, disabled, disabledOpacity, activeOpacity, ...passThroughProps }: PressableOpacityProps): React.ReactElement;