1 | import * as React from 'react';
|
2 | import { ViewStyle, StyleProp, GestureResponderEvent, TouchableWithoutFeedback } from 'react-native';
|
3 | import TouchableRipple from './TouchableRipple/TouchableRipple';
|
4 | import { IconSource } from './Icon';
|
5 | import type { $RemoveChildren } from '../types';
|
6 | declare type Props = $RemoveChildren<typeof TouchableRipple> & {
|
7 | |
8 |
|
9 |
|
10 | icon: IconSource;
|
11 | |
12 |
|
13 |
|
14 | color?: string;
|
15 | |
16 |
|
17 |
|
18 | size?: number;
|
19 | |
20 |
|
21 |
|
22 | disabled?: boolean;
|
23 | |
24 |
|
25 |
|
26 | animated?: boolean;
|
27 | |
28 |
|
29 |
|
30 | accessibilityLabel?: string;
|
31 | |
32 |
|
33 |
|
34 | onPress?: (e: GestureResponderEvent) => void;
|
35 | style?: StyleProp<ViewStyle>;
|
36 | ref?: React.RefObject<TouchableWithoutFeedback>;
|
37 | |
38 |
|
39 |
|
40 | theme: ReactNativePaper.Theme;
|
41 | };
|
42 | declare const _default: React.ComponentType<Pick<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<TouchableWithoutFeedback> & {
|
43 | borderless?: boolean | undefined;
|
44 | background?: Object | undefined;
|
45 | centered?: boolean | undefined;
|
46 | disabled?: boolean | undefined;
|
47 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
48 | onLongPress?: ((e: GestureResponderEvent) => void) | undefined;
|
49 | rippleColor?: string | undefined;
|
50 | underlayColor?: string | undefined;
|
51 | children: React.ReactNode;
|
52 | style?: StyleProp<ViewStyle>;
|
53 | theme: ReactNativePaper.Theme;
|
54 | }, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<TouchableWithoutFeedback>> & {
|
55 | /**
|
56 | * Size of the icon.
|
57 | */
|
58 | theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
59 | }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<TouchableWithoutFeedback> & {
|
60 | borderless?: boolean | undefined;
|
61 | background?: Object | undefined;
|
62 | centered?: boolean | undefined;
|
63 | disabled?: boolean | undefined;
|
64 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
65 | onLongPress?: ((e: GestureResponderEvent) => void) | undefined;
|
66 | rippleColor?: string | undefined;
|
67 | underlayColor?: string | undefined;
|
68 | children: React.ReactNode;
|
69 | style?: StyleProp<ViewStyle>;
|
70 | theme: ReactNativePaper.Theme;
|
71 | }> & {
|
72 | ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<TouchableWithoutFeedback> & {
|
73 | borderless?: boolean | undefined;
|
74 | background?: Object | undefined;
|
75 | centered?: boolean | undefined;
|
76 | disabled?: boolean | undefined;
|
77 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
78 | onLongPress?: ((e: GestureResponderEvent) => void) | undefined;
|
79 | rippleColor?: string | undefined;
|
80 | underlayColor?: string | undefined;
|
81 | children: React.ReactNode;
|
82 | style?: StyleProp<ViewStyle>;
|
83 | theme: ReactNativePaper.Theme;
|
84 | }): JSX.Element;
|
85 | supported: boolean;
|
86 | }, {}>> & {
|
87 | /**
|
88 | * Icon to display.
|
89 | */
|
90 | icon: IconSource;
|
91 | /**
|
92 | * Color of the icon.
|
93 | */
|
94 | color?: string | undefined;
|
95 | /**
|
96 | * Size of the icon.
|
97 | */
|
98 | size?: number | undefined;
|
99 | /**
|
100 | * Whether the button is disabled. A disabled button is greyed out and `onPress` is not called on touch.
|
101 | */
|
102 | disabled?: boolean | undefined;
|
103 | /**
|
104 | * Whether an icon change is animated.
|
105 | */
|
106 | animated?: boolean | undefined;
|
107 | /**
|
108 | * Accessibility label for the button. This is read by the screen reader when the user taps the button.
|
109 | */
|
110 | accessibilityLabel?: string | undefined;
|
111 | /**
|
112 | * Function to execute on press.
|
113 | */
|
114 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
115 | style?: StyleProp<ViewStyle>;
|
116 | ref?: React.RefObject<TouchableWithoutFeedback> | undefined;
|
117 | /**
|
118 | * @optional
|
119 | */
|
120 | theme: ReactNativePaper.Theme;
|
121 | }, "style" | "color" | "size" | "onLayout" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "icon" | "ref" | "key" | "hitSlop" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "pressRetentionOffset" | "touchSoundDisabled" | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | "animated"> & {
|
122 | /**
|
123 | * Size of the icon.
|
124 | */
|
125 | theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
126 | }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<TouchableWithoutFeedback> & {
|
127 | borderless?: boolean | undefined;
|
128 | background?: Object | undefined;
|
129 | centered?: boolean | undefined;
|
130 | disabled?: boolean | undefined;
|
131 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
132 | onLongPress?: ((e: GestureResponderEvent) => void) | undefined;
|
133 | rippleColor?: string | undefined;
|
134 | underlayColor?: string | undefined;
|
135 | children: React.ReactNode;
|
136 | style?: StyleProp<ViewStyle>;
|
137 | theme: ReactNativePaper.Theme;
|
138 | }, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<TouchableWithoutFeedback>> & {
|
139 | /**
|
140 | * Size of the icon.
|
141 | */
|
142 | theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
143 | }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<TouchableWithoutFeedback> & {
|
144 | borderless?: boolean | undefined;
|
145 | background?: Object | undefined;
|
146 | centered?: boolean | undefined;
|
147 | disabled?: boolean | undefined;
|
148 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
149 | onLongPress?: ((e: GestureResponderEvent) => void) | undefined;
|
150 | rippleColor?: string | undefined;
|
151 | underlayColor?: string | undefined;
|
152 | children: React.ReactNode;
|
153 | style?: StyleProp<ViewStyle>;
|
154 | theme: ReactNativePaper.Theme;
|
155 | }> & {
|
156 | ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<TouchableWithoutFeedback> & {
|
157 | borderless?: boolean | undefined;
|
158 | background?: Object | undefined;
|
159 | centered?: boolean | undefined;
|
160 | disabled?: boolean | undefined;
|
161 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
162 | onLongPress?: ((e: GestureResponderEvent) => void) | undefined;
|
163 | rippleColor?: string | undefined;
|
164 | underlayColor?: string | undefined;
|
165 | children: React.ReactNode;
|
166 | style?: StyleProp<ViewStyle>;
|
167 | theme: ReactNativePaper.Theme;
|
168 | }): JSX.Element;
|
169 | supported: boolean;
|
170 | }, {}>> & {
|
171 | /**
|
172 | * Icon to display.
|
173 | */
|
174 | icon: IconSource;
|
175 | /**
|
176 | * Color of the icon.
|
177 | */
|
178 | color?: string | undefined;
|
179 | /**
|
180 | * Size of the icon.
|
181 | */
|
182 | size?: number | undefined;
|
183 | /**
|
184 | * Whether the button is disabled. A disabled button is greyed out and `onPress` is not called on touch.
|
185 | */
|
186 | disabled?: boolean | undefined;
|
187 | /**
|
188 | * Whether an icon change is animated.
|
189 | */
|
190 | animated?: boolean | undefined;
|
191 | /**
|
192 | * Accessibility label for the button. This is read by the screen reader when the user taps the button.
|
193 | */
|
194 | accessibilityLabel?: string | undefined;
|
195 | /**
|
196 | * Function to execute on press.
|
197 | */
|
198 | onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
199 | style?: StyleProp<ViewStyle>;
|
200 | ref?: React.RefObject<TouchableWithoutFeedback> | undefined;
|
201 | /**
|
202 | * @optional
|
203 | */
|
204 | theme: ReactNativePaper.Theme;
|
205 | }> & (({ icon, color: customColor, size, accessibilityLabel, disabled, onPress, animated, theme, style, ...rest }: Props) => JSX.Element), {}>;
|
206 | export default _default;
|
207 |
|
\ | No newline at end of file |