zoontek/react-native-localize

Override direction from style.

chirani opened this issue · 1 comments

Why it is needed?

In Case of switching from RTL to LTR or vice versa, I want the option to keep certain parts of my App as RTL in every Language or as LTR in every language.

I know the same can be achieved through Flexbox, but it would double the amount of style code.

Possible implementation

I think the "direction" property should be sufficient for that.

Code sample

//Why can't we just use this

container: {flexDirection: 'row-reverse', direction: 'ltr'}

//Instead of 

container: isRTL? {flexDirection: 'row-reverse'}: {flexDirection: 'row'}

What has it to do with this library? isRTL is just a boolean, this library don't handle styles.