toggle-switch-react-native icon indicating copy to clipboard operation
toggle-switch-react-native copied to clipboard

rtl support

Open jeffelector opened this issue 5 years ago • 3 comments

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.

jeffelector avatar Sep 05 '19 07:09 jeffelector

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

aminebenkeroum avatar Sep 05 '19 17:09 aminebenkeroum

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 !

AnasAlsaadi avatar Apr 15 '20 16:04 AnasAlsaadi

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

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

bureyburey avatar May 13 '20 13:05 bureyburey