Skip to content

Commit 9374590

Browse files
authored
Merge pull request ptomasroos#559 from zumaawad/master
RTL ScrollableTabBar support
2 parents 212be9b + 7ebea02 commit 9374590

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ScrollableTabBar.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {
88
Text,
99
Platform,
1010
Dimensions,
11+
I18nManager
1112
} = ReactNative;
1213
const Button = require('./Button');
1314

@@ -157,10 +158,11 @@ const ScrollableTabBar = React.createClass({
157158
bottom: 0,
158159
};
159160

161+
const key = I18nManager.isRTL ? 'right' : 'left';
160162
const dynamicTabUnderline = {
161-
left: this.state._leftTabUnderline,
162-
width: this.state._widthTabUnderline,
163-
};
163+
[`${key}`]: this.state._leftTabUnderline,
164+
width: this.state._widthTabUnderline
165+
}
164166

165167
return <View
166168
style={[styles.container, {backgroundColor: this.props.backgroundColor, }, this.props.style, ]}

0 commit comments

Comments
 (0)