diff --git a/src/index.js b/src/index.js index 62a1e9b..0a4d8da 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,7 @@ import { Text, View, ViewPropTypes, + I18nManager, } from 'react-native' import PropTypes from 'prop-types' @@ -30,11 +31,13 @@ const styles = StyleSheet.create({ position: 'absolute', top: 0, left: 0, + right: 0 }, halfCircle: { position: 'absolute', top: 0, left: 0, + right: 0, borderTopRightRadius: 0, borderBottomRightRadius: 0, backgroundColor: '#f00', @@ -179,11 +182,10 @@ export default class PercentageCircle extends React.PureComponent { width: radius, height: radius * 2, borderRadius: radius, - backgroundColor, transform: [ - { translateX: radius / 2 }, + { translateX: I18nManager.isRTL ? -radius / 2 : radius / 2 }, { rotate }, - { translateX: -radius / 2 }, + { translateX: I18nManager.isRTL ? radius / 2 : -radius / 2 }, ], }, ]}