Skip to content

Commit

Permalink
fix: add RTL support to searchbar(#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
iyadthayyil authored and satya164 committed Nov 5, 2018
1 parent decbedb commit aed0bfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/src/SearchbarExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SearchExample extends React.Component<Props, State> {
onChangeText={query => this.setState({ secondQuery: query })}
value={this.state.secondQuery}
onIconPress={() => this.props.navigation.goBack()}
icon="arrow-back"
icon={{ source: 'arrow-back', direction: 'auto' }}
style={styles.searchbar}
/>
<Searchbar
Expand Down
3 changes: 2 additions & 1 deletion src/components/Searchbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */

import * as React from 'react';
import { StyleSheet, TextInput } from 'react-native';
import { StyleSheet, TextInput, I18nManager } from 'react-native';

import color from 'color';
import IconButton from './IconButton';
Expand Down Expand Up @@ -191,6 +191,7 @@ const styles = StyleSheet.create({
fontSize: 18,
paddingLeft: 8,
alignSelf: 'stretch',
textAlign: I18nManager.isRTL ? 'right' : 'left',
},
});

Expand Down

0 comments on commit aed0bfd

Please sign in to comment.