Skip to content

Commit 11a9a63

Browse files
committed
Clean up styles
1 parent fcdcde9 commit 11a9a63

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed
Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
import { StyleSheet } from 'react-nativescript';
32

43
export function ExampleTabs() {
54
const [selectedIndex, setSelectedIndex] = React.useState(0);
@@ -10,61 +9,40 @@ export function ExampleTabs() {
109
onSelectedIndexChanged={(args) => {
1110
setSelectedIndex(args.newIndex);
1211
}}
13-
style={{ ...styles.fullSize, backgroundColor: 'orange' }}
12+
style={{ backgroundColor: 'orange' }}
1413
>
1514
{/* The bottomTab UI is created via tabStrip (the container) and tabStripItem (for each tab) */}
1615
<tabStrip nodeRole="tabStrip" style={{ backgroundColor: 'red' }}>
1716
<tabStripItem nodeRole="items">
1817
<label nodeRole="label">Home</label>
1918
<image nodeRole="image" src="font://&#xf015;" className="fas" />
2019
</tabStripItem>
21-
<tabStripItem nodeRole="items" className="special">
20+
<tabStripItem nodeRole="items">
2221
<label nodeRole="label">Account</label>
2322
<image nodeRole="image" src="font://&#xf007;" className="fas" />
2423
</tabStripItem>
25-
<tabStripItem nodeRole="items" className="special">
24+
<tabStripItem nodeRole="items">
2625
<label nodeRole="label">Search</label>
2726
<image nodeRole="image" src="font://&#xf00e;" className="fas" />
2827
</tabStripItem>
2928
</tabStrip>
3029

3130
{/* The number of tabContentItem components should corespond to the number of TabStripItem components */}
3231
<tabContentItem nodeRole="items">
33-
<gridLayout style={{ ...styles.fullSize, backgroundColor: 'blue' }}>
32+
<gridLayout style={{ backgroundColor: 'blue' }}>
3433
<label style={{ color: 'white' }}>Home Page</label>
3534
</gridLayout>
3635
</tabContentItem>
3736
<tabContentItem nodeRole="items">
38-
<gridLayout style={{ ...styles.fullSize, backgroundColor: 'cyan' }}>
37+
<gridLayout style={{ backgroundColor: 'cyan' }}>
3938
<label style={{ color: 'black' }}>Account Page</label>
4039
</gridLayout>
4140
</tabContentItem>
4241
<tabContentItem nodeRole="items">
43-
<gridLayout style={{ ...styles.fullSize, backgroundColor: 'magenta' }}>
42+
<gridLayout style={{ backgroundColor: 'magenta' }}>
4443
<label style={{ color: 'black' }}>Search Page</label>
4544
</gridLayout>
4645
</tabContentItem>
4746
</tabs>
4847
);
4948
}
50-
51-
const styles = StyleSheet.create({
52-
fullSize: {
53-
height: '100%',
54-
width: '100%'
55-
},
56-
container: {
57-
height: '100%',
58-
flexDirection: 'column',
59-
justifyContent: 'center'
60-
},
61-
text: {
62-
textAlignment: 'center',
63-
fontSize: 24,
64-
color: 'black'
65-
},
66-
button: {
67-
fontSize: 24,
68-
color: '#2e6ddf'
69-
}
70-
});

0 commit comments

Comments
 (0)