@@ -37,7 +37,7 @@ export default class TabBarScreen extends Component {
37
37
do {
38
38
index = Math . floor ( Math . random ( ) * this . tabbar . props . children . length ) ;
39
39
} while ( index === this . state . selectedIndex ) ;
40
-
40
+
41
41
this . setState ( { selectedIndex : index } ) ;
42
42
}
43
43
} ;
@@ -82,7 +82,7 @@ export default class TabBarScreen extends Component {
82
82
removeTab = ( ) => {
83
83
const index = this . state . selectedIndex ;
84
84
const newTabs = this . state . currentTabs ;
85
-
85
+
86
86
if ( newTabs . length >= 0 ) {
87
87
newTabs . splice ( index , 1 ) ;
88
88
}
@@ -92,7 +92,7 @@ export default class TabBarScreen extends Component {
92
92
/** Actions */
93
93
getTabs ( showAddTab : boolean ) {
94
94
const tabs = _ . map ( this . state . currentTabs , tab => this . renderTabs ( tab ) ) ;
95
-
95
+
96
96
if ( showAddTab ) {
97
97
tabs . push ( this . renderAddTabsTab ( ) ) ;
98
98
} else {
@@ -126,20 +126,15 @@ export default class TabBarScreen extends Component {
126
126
< ScrollView style = { { overflow : 'visible' } } showsVerticalScrollIndicator = { false } >
127
127
< View bg-dark80 >
128
128
< TabBar style = { styles . tabbar } selectedIndex = { 0 } enableShadow >
129
- < TabBar . Item
130
- label = "single tab"
129
+ < TabBar . Item
130
+ label = "single tab"
131
131
labelStyle = { { color : Colors . green30 , fontWeight : 'bold' , textTransform : 'capitalize' } }
132
132
/>
133
133
</ TabBar >
134
134
135
- < TabBar
136
- style = { styles . tabbar }
137
- selectedIndex = { 0 }
138
- enableShadow
139
- // tabletMargins={{portrait: 0, landscape: 0}}
140
- >
141
- < TabBar . Item label = "Fixed" uppercase backgroundColor = { Colors . blue80 } />
142
- < TabBar . Item label = "Tab" badgeProps = { { label : '100' } } uppercase style = { { backgroundColor : Colors . blue80 } } />
135
+ < TabBar style = { styles . tabbar } selectedIndex = { 0 } enableShadow >
136
+ < TabBar . Item label = "Fixed" uppercase style = { { backgroundColor : Colors . blue80 } } />
137
+ < TabBar . Item label = "Tab" badge = { { label : '100' } } uppercase style = { { backgroundColor : Colors . blue80 } } />
143
138
< TabBar . Item label = "Bar" uppercase style = { { backgroundColor : Colors . blue80 } } />
144
139
</ TabBar >
145
140
@@ -151,7 +146,7 @@ export default class TabBarScreen extends Component {
151
146
152
147
< TabBar style = { styles . tabbar } selectedIndex = { 0 } ref = { r => ( this . tabbar = r ) } enableShadow >
153
148
< TabBar . Item label = "Scroll" />
154
- < TabBar . Item label = "View" badgeProps = { { size : 'pimpleSmall' } } />
149
+ < TabBar . Item label = "View" badge = { { size : 'pimpleSmall' } } />
155
150
< TabBar . Item label = "tab" />
156
151
< TabBar . Item label = "bar" />
157
152
< TabBar . Item label = "Container" />
@@ -174,20 +169,13 @@ export default class TabBarScreen extends Component {
174
169
{ this . getTabs ( true ) }
175
170
</ TabBar >
176
171
177
- < View center >
178
- < Button
179
- size = { Button . sizes . small }
180
- margin-20
181
- label = { `Change index: ${ this . state . selectedIndex } ` }
182
- onPress = { this . changeIndex }
183
- />
184
- </ View >
185
- < TabBar
186
- style = { styles . tabbar }
187
- selectedIndex = { this . state . selectedIndex }
188
- enableShadow
189
- backgroundColor = { Colors . green70 }
190
- >
172
+ < Button
173
+ size = { Button . sizes . small }
174
+ margin-20
175
+ label = { `Change index: ${ this . state . selectedIndex } ` }
176
+ onPress = { this . changeIndex }
177
+ />
178
+ < TabBar style = { styles . tabbar } selectedIndex = { this . state . selectedIndex } enableShadow backgroundColor = { Colors . green70 } >
191
179
< TabBar . Item label = "LONG LABEL" />
192
180
< TabBar . Item label = "ACTIVE" />
193
181
< TabBar . Item label = "INACTIVE" />
@@ -199,7 +187,7 @@ export default class TabBarScreen extends Component {
199
187
< TabBar . Item label = "MODE" />
200
188
</ TabBar >
201
189
202
- < View center row >
190
+ < View row >
203
191
< Button size = { Button . sizes . small } margin-20 label = { `Change Labels` } onPress = { this . changeLabels } />
204
192
< Button size = { Button . sizes . small } margin-20 label = { `Change Color` } onPress = { this . changeColors } />
205
193
</ View >
0 commit comments