UNPKG

2.42 kBTypeScriptView Raw
1import React from 'react';
2import { TouchableOpacityProps, TouchableNativeFeedbackProps, StyleProp, ViewStyle, ActivityIndicatorProps, TextStyle } from 'react-native';
3import { RneFunctionComponent } from '../helpers';
4import { IconNode } from '../icons/Icon';
5import { TextProps } from '../text/Text';
6export declare type ButtonProps = TouchableOpacityProps & TouchableNativeFeedbackProps & {
7 title?: string | React.ReactElement<{}>;
8 titleStyle?: StyleProp<TextStyle>;
9 titleProps?: TextProps;
10 buttonStyle?: StyleProp<ViewStyle>;
11 type?: 'solid' | 'clear' | 'outline';
12 loading?: boolean;
13 loadingStyle?: StyleProp<ViewStyle>;
14 loadingProps?: ActivityIndicatorProps;
15 containerStyle?: StyleProp<ViewStyle>;
16 icon?: IconNode;
17 iconContainerStyle?: StyleProp<ViewStyle>;
18 iconRight?: boolean;
19 linearGradientProps?: object;
20 TouchableComponent?: typeof React.Component;
21 ViewComponent?: typeof React.Component;
22 disabled?: boolean;
23 disabledStyle?: StyleProp<ViewStyle>;
24 disabledTitleStyle?: StyleProp<TextStyle>;
25 raised?: boolean;
26 iconPosition?: 'left' | 'right' | 'top' | 'bottom';
27};
28declare const Button: RneFunctionComponent<ButtonProps>;
29export { Button };
30declare const _default: React.FunctionComponent<Pick<ButtonProps, "style" | "onLayout" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "raised" | "disabled" | "onPress" | "onLongPress" | "activeOpacity" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "hitSlop" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "hasTVPreferredFocus" | "tvParallaxProperties" | "touchSoundDisabled" | "background" | "useForeground" | "type" | "containerStyle" | "disabledStyle" | "title" | "icon" | "titleStyle" | "loading" | "titleProps" | "buttonStyle" | "loadingStyle" | "loadingProps" | "iconContainerStyle" | "iconRight" | "linearGradientProps" | "TouchableComponent" | "ViewComponent" | "disabledTitleStyle" | "iconPosition">> | React.ForwardRefExoticComponent<ButtonProps>;
31export default _default;