Skip to content

Commit 55cb8ed

Browse files
committed
Export TabBarProps and fix BadgeScreen typescript errors
1 parent ccb4282 commit 55cb8ed

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

demo/src/screens/componentScreens/BadgesScreen.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@ const star = require('../../assets/icons/star.png');
88
const bell = require('../../assets/icons/bell.png');
99

1010
export default class BadgesScreen extends Component {
11-
constructor(props) {
12-
super(props);
11+
state = {
12+
value: 42
13+
};
1314

14-
this.state = {
15-
value: 42
16-
};
17-
}
18-
19-
changeLabelValue(value) {
15+
changeLabelValue(value: number) {
2016
const currValue = this.state.value;
2117
const newValue = currValue + value;
2218
if (newValue >= 1) {
@@ -103,7 +99,6 @@ export default class BadgesScreen extends Component {
10399
<View row>
104100
<View
105101
center
106-
column
107102
style={{justifyContent: 'space-around', alignItems: 'flex-start', width: 140, height: 140}}
108103
>
109104
<Text text80 row>
@@ -115,7 +110,7 @@ export default class BadgesScreen extends Component {
115110
</Text>
116111
</View>
117112

118-
<View center column style={{justifyContent: 'space-around', width: 40, height: 140}}>
113+
<View center style={{justifyContent: 'space-around', width: 40, height: 140}}>
119114
<Badge containerStyle={{marginLeft: BadgesSpace}} backgroundColor={Colors.green30} size={'pimpleSmall'}/>
120115
<Badge containerStyle={{marginLeft: BadgesSpace}} backgroundColor={Colors.red30} size={'pimpleBig'}/>
121116
<Badge containerStyle={{marginLeft: BadgesSpace}} backgroundColor={Colors.blue30} size={'pimpleHuge'}/>

src/components/tabBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const MIN_TABS_FOR_SCROLL = 1;
1313
const DEFAULT_BACKGROUND_COLOR = Colors.white;
1414
const DEFAULT_HEIGHT = 48;
1515

16-
type TabBarProps = ScrollBarProps /* & TabBarItemProps */ & {
16+
export type TabBarProps = ScrollBarProps /* & TabBarItemProps */ & {
1717
/**
1818
* Show Tab Bar bottom shadow
1919
*/

0 commit comments

Comments
 (0)