You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/base/src/Button/Button.tsx
+60-51
Original file line number
Diff line number
Diff line change
@@ -39,81 +39,90 @@ const positionStyle = {
39
39
left: 'row',
40
40
right: 'row-reverse',
41
41
};
42
+
/**
43
+
* @name BUtton
44
+
*/
45
+
exportinterfaceButtonProps
46
+
extendsTouchableOpacityProps,
47
+
TouchableNativeFeedbackProps{
48
+
/** Add button title. */
49
+
title?: string|React.ReactElement<{}>;
42
50
43
-
exporttypeButtonProps=TouchableOpacityProps&
44
-
TouchableNativeFeedbackProps&{
45
-
/** Add button title. */
46
-
title?: string|React.ReactElement<{}>;
47
-
48
-
/** Add additional styling for title component. */
49
-
titleStyle?: StyleProp<TextStyle>;
51
+
/** Add additional styling for title component. */
52
+
titleStyle?: StyleProp<TextStyle>;
50
53
51
-
/** Add additional props for Text component. */
52
-
titleProps?: TextProps;
54
+
/** Add additional props for Text component. */
55
+
titleProps?: TextProps;
53
56
54
-
/** Add additional styling for button component. */
55
-
buttonStyle?: StyleProp<ViewStyle>;
57
+
/** Add additional styling for button component. */
58
+
buttonStyle?: StyleProp<ViewStyle>;
56
59
57
-
/** Type of button. */
58
-
type?: 'solid'|'clear'|'outline';
60
+
/** Type of button. */
61
+
type?: 'solid'|'clear'|'outline';
59
62
60
-
/** Prop to display a loading spinner. */
61
-
loading?: boolean;
63
+
/** Prop to display a loading spinner. */
64
+
loading?: boolean;
62
65
63
-
/** Add additional styling for loading component. */
64
-
loadingStyle?: StyleProp<ViewStyle>;
66
+
/** Add additional styling for loading component. */
67
+
loadingStyle?: StyleProp<ViewStyle>;
65
68
66
-
/** Add additional props for ActivityIndicator component. */
67
-
loadingProps?: ActivityIndicatorProps;
69
+
/** Add additional props for ActivityIndicator component. */
70
+
loadingProps?: ActivityIndicatorProps;
68
71
69
-
/** Styling for Component container. */
70
-
containerStyle?: StyleProp<ViewStyle>;
72
+
/** Styling for Component container. */
73
+
containerStyle?: StyleProp<ViewStyle>;
71
74
72
-
/** Displays a centered icon (when no title) or to the left (with text). (can be used along with iconRight as well). Can be an object or a custom component. */
73
-
icon?: IconNode;
75
+
/** Displays a centered icon (when no title) or to the left (with text). (can be used along with iconRight as well). Can be an object or a custom component. */
76
+
icon?: IconNode;
74
77
75
-
/** Styling for Icon Component container. */
76
-
iconContainerStyle?: StyleProp<ViewStyle>;
78
+
/** Styling for Icon Component container. */
79
+
iconContainerStyle?: StyleProp<ViewStyle>;
77
80
78
-
/** Displays Icon to the right of title. Needs to be used along with `icon` prop. */
79
-
iconRight?: boolean;
81
+
/** Displays Icon to the right of title. Needs to be used along with `icon` prop. */
82
+
iconRight?: boolean;
80
83
81
-
/** Displays a linear gradient. See [usage](#lineargradient-usage). */
82
-
linearGradientProps?: object;
84
+
/** Displays a linear gradient. See [usage](#lineargradient-usage). */
85
+
linearGradientProps?: object;
83
86
84
-
/** Component for user interaction. */
85
-
TouchableComponent?: typeofReact.Component;
87
+
/** Component for user interaction. */
88
+
TouchableComponent?: typeofReact.Component;
86
89
87
-
/** Component for container. */
88
-
ViewComponent?: typeofReact.Component;
90
+
/** Component for container. */
91
+
ViewComponent?: typeofReact.Component;
89
92
90
-
/** Disables user interaction. */
91
-
disabled?: boolean;
93
+
/** Disables user interaction. */
94
+
disabled?: boolean;
92
95
93
-
/** Style of the button when disabled. */
94
-
disabledStyle?: StyleProp<ViewStyle>;
96
+
/** Style of the button when disabled. */
97
+
disabledStyle?: StyleProp<ViewStyle>;
95
98
96
-
/** Style of the title when disabled. */
97
-
disabledTitleStyle?: StyleProp<TextStyle>;
99
+
/** Style of the title when disabled. */
100
+
disabledTitleStyle?: StyleProp<TextStyle>;
98
101
99
-
/** Add raised button styling (optional). Has no effect if `type="clear"`. */
100
-
raised?: boolean;
102
+
/** Add raised button styling (optional). Has no effect if `type="clear"`. */
103
+
raised?: boolean;
101
104
102
-
/** Displays Icon to the position mentioned. Needs to be used along with `icon` prop. */
103
-
iconPosition?: 'left'|'right'|'top'|'bottom';
104
-
};
105
+
/** Displays Icon to the position mentioned. Needs to be used along with `icon` prop. */
106
+
iconPosition?: 'left'|'right'|'top'|'bottom';
107
+
}
105
108
106
-
/** Buttons are touchable elements used to interact with the screen and to perform and operation.
109
+
/**
110
+
* Buttons are touchable elements used to interact with the screen and to perform and operation.
107
111
* They may display text, icons, or both. Buttons can be styled with several props to look a specific way.
108
112
* Also receives all [TouchableNativeFeedback](http://reactnative.dev/docs/touchablenativefeedback.html#props) (Android) or [TouchableOpacity](http://reactnative.dev/docs/touchableopacity.html#props) (iOS) props.
0 commit comments