1
1
import React from 'react' ;
2
- import { Animated , ViewStyle , TextStyle } from 'react-native' ;
3
- import { BaseComponentInjectedProps } from '../../commons/new' ;
2
+ import { Animated , StyleProp , ViewStyle , TextStyle } from 'react-native' ;
4
3
import { BadgeProps } from '../badge' ;
5
- export declare type TabBarItemProps = BaseComponentInjectedProps & {
4
+ interface Props {
6
5
/**
7
6
* icon of the tab
8
7
*/
@@ -22,19 +21,20 @@ export declare type TabBarItemProps = BaseComponentInjectedProps & {
22
21
/**
23
22
* custom label style
24
23
*/
25
- labelStyle ?: TextStyle ;
24
+ labelStyle ?: StyleProp < TextStyle > ;
26
25
/**
27
26
* Badge component props to display next the item label
28
27
*/
29
28
badge ?: BadgeProps ;
29
+ badgeProps ?: BadgeProps ;
30
30
/**
31
31
* maximum number of lines the label can break
32
32
*/
33
33
maxLines ?: number ;
34
34
/**
35
35
* custom selected tab label style
36
36
*/
37
- selectedLabelStyle : TextStyle ;
37
+ selectedLabelStyle ?: StyleProp < TextStyle > ;
38
38
/**
39
39
* whether the tab is selected or not
40
40
*/
@@ -47,14 +47,18 @@ export declare type TabBarItemProps = BaseComponentInjectedProps & {
47
47
* A fixed width for the item
48
48
*/
49
49
width ?: number ;
50
+ /**
51
+ * tabBar's background color
52
+ */
53
+ backgroundColor ?: string ;
50
54
/**
51
55
* ignore of the tab
52
56
*/
53
57
ignore ?: boolean ;
54
58
/**
55
59
* callback for when pressing a tab
56
60
*/
57
- onPress ?: ( props : any ) => void ;
61
+ onPress ?: ( ) => void ;
58
62
/**
59
63
* whether to change the text to uppercase
60
64
*/
@@ -63,78 +67,17 @@ export declare type TabBarItemProps = BaseComponentInjectedProps & {
63
67
* Apply background color on press for TouchableOpacity
64
68
*/
65
69
activeBackgroundColor ?: string ;
66
- indicatorStyle ?: ViewStyle ;
70
+ accessibilityLabel ?: string ;
71
+ indicatorStyle ?: StyleProp < ViewStyle > ;
67
72
style ?: ViewStyle ;
68
73
testID ?: string ;
69
- } ;
70
- export declare type State = {
71
- indicatorOpacity ?: Animated . Value ;
72
- } ;
73
- declare const _default : React . ComponentClass < BaseComponentInjectedProps & {
74
- /**
75
- * icon of the tab
76
- */
77
- icon ?: number | undefined ;
78
- /**
79
- * icon tint color
80
- */
81
- iconColor ?: string | undefined ;
82
- /**
83
- * icon selected tint color
84
- */
85
- iconSelectedColor ?: string | undefined ;
86
- /**
87
- * label of the tab
88
- */
89
- label ?: string | undefined ;
90
- /**
91
- * custom label style
92
- */
93
- labelStyle ?: TextStyle | undefined ;
94
- /**
95
- * Badge component props to display next the item label
96
- */
97
- badge ?: BadgeProps | undefined ;
98
- /**
99
- * maximum number of lines the label can break
100
- */
101
- maxLines ?: number | undefined ;
102
- /**
103
- * custom selected tab label style
104
- */
105
- selectedLabelStyle : TextStyle ;
106
- /**
107
- * whether the tab is selected or not
108
- */
109
- selected ?: boolean | undefined ;
110
- /**
111
- * whether the tab will have a divider on its right
112
- */
113
- showDivider ?: boolean | undefined ;
114
- /**
115
- * A fixed width for the item
116
- */
117
- width ?: number | undefined ;
118
- /**
119
- * ignore of the tab
120
- */
121
- ignore ?: boolean | undefined ;
122
- /**
123
- * callback for when pressing a tab
124
- */
125
- onPress ?: ( ( props : any ) => void ) | undefined ;
126
- /**
127
- * whether to change the text to uppercase
128
- */
129
- uppercase ?: boolean | undefined ;
130
- /**
131
- * Apply background color on press for TouchableOpacity
132
- */
133
- activeBackgroundColor ?: string | undefined ;
134
- indicatorStyle ?: ViewStyle | undefined ;
135
- style ?: ViewStyle | undefined ;
136
- testID ?: string | undefined ;
137
- } & {
74
+ }
75
+ interface State {
76
+ indicatorOpacity : Animated . Value ;
77
+ selected ?: boolean ;
78
+ }
79
+ export declare type TabBarItemProps = Props ;
80
+ declare const _default : React . ComponentClass < Props & {
138
81
useCustomTheme ?: boolean | undefined ;
139
82
} , any > & State ;
140
83
export default _default ;
0 commit comments