Skip to content

Fix/button RTL support #898

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

Merged
merged 7 commits into from
Aug 24, 2020
Merged

Fix/button RTL support #898

merged 7 commits into from
Aug 24, 2020

Conversation

lidord-wix
Copy link
Contributor

Button is now support RTL which allows users to flip icon inside button.

Comment on lines 412 to 419
getIconStyle() {
const {disabled, iconStyle: propsIconStyle, iconOnRight} = this.props;
const {disabled, iconStyle: propsIconStyle, iconOnRight, supportRTL} = this.props;
const size = this.props.size || DEFAULT_SIZE;
const shouldFlipRTL = supportRTL && Constants.isRTL;
const iconStyle: ImageStyle = {
tintColor: this.getLabelColor()
tintColor: this.getLabelColor(),
transform: shouldFlipRTL ? [{scaleX: -1}] : undefined
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Image already supports this feature, why not just pass forward the supportRTL prop

@lidord-wix lidord-wix requested a review from ethanshar August 19, 2020 15:21
@ethanshar ethanshar merged commit bf9e2b3 into master Aug 24, 2020
@lidord-wix lidord-wix deleted the fix/Button_RTL_support branch September 15, 2020 13:44
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

Successfully merging this pull request may close these issues.

2 participants