Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

top-bar-nav support RTL direction #2

Open
RanyHajYahia opened this issue Oct 6, 2020 · 6 comments
Open

top-bar-nav support RTL direction #2

RanyHajYahia opened this issue Oct 6, 2020 · 6 comments

Comments

@RanyHajYahia
Copy link

RanyHajYahia commented Oct 6, 2020

Hi,
I would like to thank you for this navigator, it's very useful and I am currently using it in my project.
I am opening this ticket since I have a translated application to RTL direction languages (Arabic / Hebrew) and the navigator is not supporting this direction.
It will be very helpful if "isRTL" boolean indicator will be added to this component in the next release.

Thanks

@mileung
Copy link
Owner

mileung commented Oct 7, 2020

I don't have the time to update this package. Open to PRs though!. Although couldn't you solve your problem with the initialIndex prop?

@RanyHajYahia
Copy link
Author

InitialIndex should be always 0, in RTL languages 0 start from the right and better not to do manipulations like initiating index from the last or reverse arrays. (because swiping left and right for changing tabs also should be opposite)
Please advise where I can report about the case if there is any support for this package.

@mileung
Copy link
Owner

mileung commented Oct 7, 2020

You or someone else can make a PR for this feature and I'll probably approve and publish it in a new version.

@vaporwavie
Copy link

@RanyHajYahia if you only need to enable rtl within the HOC (top-bar-nav, that is), I think you can make it work by creating a prop like isRTL and thus applying the necessary styles. I can give you some insights if you want to!

@RanyHajYahia
Copy link
Author

@vaporwavie anything can help before I start trying myself. especially how to increase index on swiping right (unlike English that swiping left).
Thanks

@vaporwavie
Copy link

@RanyHajYahia I suppose you don't necessarily need to increase the index? I was imagining a CSS approach. You shouldn't have to literally update an index position just to make RTL-ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants