aminebenkeroum / toggle-switch-react-native

Toggle Switch React Native Component works on both iOS and Android
MIT License
235 stars 70 forks source link

rtl support #26

Open jeffelector opened 5 years ago

jeffelector commented 5 years ago

The library does not seems to be supporting rtl : WhatsApp Image 2019-09-05 at 10 15 11

the red dot is not inside the component.

aminebenkeroum commented 5 years ago

I would work on that too! Thank you for reporting it.

AnasAlsaadi commented 4 years ago

hello,

you can do that by change file ToggleSwitch.js at line 93****

remove this ==> margin: 4,

add this ==> margin: I18nManager.isRTL ? 24 : 4,

that is work for me !

bureyburey commented 4 years ago

you should also account for the different sizes (small, medium, large)

for small => margin: 22 for medium (default) => margin: 24 for large => margin: 36