Skip to content

Commit 9fe4fbc

Browse files
authored
Support passing custom style to TabController.TabBarItem (#947)
1 parent 0d8606e commit 9fe4fbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/tabController/TabBarItem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default class TabBarItem extends PureComponent {
148148
};
149149

150150
getItemStyle() {
151-
const {state} = this.props;
151+
const {state, style: propsStyle} = this.props;
152152
const opacity = block([
153153
cond(eq(state, State.END), call([], this.onPress)),
154154
cond(eq(state, State.BEGAN), this.props.activeOpacity, 1)
@@ -164,7 +164,7 @@ export default class TabBarItem extends PureComponent {
164164
style.paddingHorizontal = undefined;
165165
}
166166

167-
return style;
167+
return [style, propsStyle];
168168
}
169169

170170
getLabelStyle() {

0 commit comments

Comments
 (0)