import React from 'react'; import { type AccessibilityProps, type GestureResponderEvent, type PressableProps as NativePressableProps, type View, } from 'react-native'; import type { ComponentEventHandlerProps } from '@coinbase/cds-common/types/ComponentEventHandlerProps'; import { type InteractableBaseProps } from './Interactable'; export type HapticFeedbackType = 'light' | 'normal' | 'heavy' | 'none'; export type LinkableProps = Pick< NativePressableProps, 'onPress' | 'accessibilityLabel' | 'accessibilityHint' >; export type PressableBaseProps = AccessibilityProps & ComponentEventHandlerProps & Pick & Omit & { /** Dont scale element on press. */ noScaleOnPress?: boolean; /** Callback fired before `onPress` when button is pressed. */ onPressIn?: (event: GestureResponderEvent) => void; /** Callback fired before `onPress` when button is released. */ onPressOut?: (event: GestureResponderEvent) => void; /** * Haptic feedback to trigger when being pressed. * @default none */ feedback?: HapticFeedbackType; /** Is the element currenty loading. */ loading?: boolean; /** * The amount of time to wait (in milliseconds) before invoking the debounced function. * This prop is used in conjunction with the `disableDebounce` prop. * The debounce function is configured to be invoked as soon as it's called, but subsequent calls * within the `debounceTime` period will be ignored. * @default 500 */ debounceTime?: number; /** * React Native is historically trash at debouncing touch events. This can cause a lot of * unwanted behavior such as double navigations where we push a screen onto the stack 2 times. * Debouncing the event 500 miliseconds, but taking the leading event prevents this effect and * the accidental "double-tap". */ disableDebounce?: boolean; }; export type PressableProps = PressableBaseProps & NativePressableProps; export declare const Pressable: React.NamedExoticComponent< AccessibilityProps & ComponentEventHandlerProps & Pick & Omit & { /** Dont scale element on press. */ noScaleOnPress?: boolean; /** Callback fired before `onPress` when button is pressed. */ onPressIn?: (event: GestureResponderEvent) => void; /** Callback fired before `onPress` when button is released. */ onPressOut?: (event: GestureResponderEvent) => void; /** * Haptic feedback to trigger when being pressed. * @default none */ feedback?: HapticFeedbackType; /** Is the element currenty loading. */ loading?: boolean; /** * The amount of time to wait (in milliseconds) before invoking the debounced function. * This prop is used in conjunction with the `disableDebounce` prop. * The debounce function is configured to be invoked as soon as it's called, but subsequent calls * within the `debounceTime` period will be ignored. * @default 500 */ debounceTime?: number; /** * React Native is historically trash at debouncing touch events. This can cause a lot of * unwanted behavior such as double navigations where we push a screen onto the stack 2 times. * Debouncing the event 500 miliseconds, but taking the leading event prevents this effect and * the accidental "double-tap". */ disableDebounce?: boolean; } & NativePressableProps & { ref?: React.Ref; } >; //# sourceMappingURL=Pressable.d.ts.map