mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
Fix Popover problem for RTL 1/n
Summary: Change modal.js to support RTL Reviewed By: javache Differential Revision: D3580776 fbshipit-source-id: e9ef3f340f52e38fd905dce6d14a74d3bd7b7982
This commit is contained in:
parent
6d1277065d
commit
a527ef2032
@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const I18nManager = require('I18nManager');
|
||||||
const Platform = require('Platform');
|
const Platform = require('Platform');
|
||||||
const PropTypes = require('react/lib/ReactPropTypes');
|
const PropTypes = require('react/lib/ReactPropTypes');
|
||||||
const React = require('React');
|
const React = require('React');
|
||||||
@ -157,13 +158,14 @@ class Modal extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const side = I18nManager.isRTL ? 'right' : 'left';
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
modal: {
|
modal: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 0,
|
[side] : 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user