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

Cleanup use of button constants #36531

Merged
merged 2 commits into from
Aug 31, 2020
Merged

Conversation

cforkish
Copy link
Contributor

@cforkish cforkish commented Aug 31, 2020

This is a small PR to resolve an issue I encountered in LP-1522. I'm putting it in its own PR to create a record of the issue.

I needed to reuse the default height of our Button component in a new button, but when I exported the button heights, that broke the SyncOmniAuthSectionControl component. Long story short, @Hamms helped me figure out that if we are setting class vars on the button (e.g. Button.ButtonColor = ButtonColor;) and we add a non-default export, the class vars are no longer able to be imported individually (e.g. import Button, {ButtonColor, ButtonSize}) unless they are also exported.

Most of are coded references these constants through the class vars, so for consistency we decided to update the two files that were using individual imports. I was then able to add my new ButtonHeight class var without breaking things.

@cforkish cforkish requested review from Hamms, a team, clareconstantine and jmkulwik and removed request for a team August 31, 2020 21:06
Copy link
Contributor

@jmkulwik jmkulwik left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the cleanup!

@cforkish cforkish merged commit 4b4e004 into staging Aug 31, 2020
@cforkish cforkish deleted the cforkish/cleanup-button-class-vars branch August 31, 2020 22:25
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.

None yet

3 participants