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

refactor: migrate button styled components #1062

Merged
merged 8 commits into from
Oct 10, 2019

Conversation

TahimiLeonBravo
Copy link
Collaborator

@TahimiLeonBravo TahimiLeonBravo commented Oct 8, 2019

#950

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Oct 8, 2019

Code Refactoring

  • migrate Button to styled-components (cd413b5)

Tests

Bug Fixes

Contributors

@TahimiLeonBravo, @LeandroTorresSicilia

}

&[disabled] {
background-color: ${props.isLoading ? 'COLOR_WHITE' : 'transparent'};
Copy link
Member

@LeandroTorresSicilia LeandroTorresSicilia Oct 10, 2019

Choose a reason for hiding this comment

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

use COLOR_WHITE constant without ' ' because here it converts to this css:
background-color: COLOR_WHITE and there is not COLOR_WHITE color so use:
background-color: ${props.isLoading ? COLOR_WHITE : 'transparent'};
change in all places

props.shaded &&
`
box-shadow: ${SHADOW_1};
`};
Copy link
Member

@LeandroTorresSicilia LeandroTorresSicilia Oct 10, 2019

Choose a reason for hiding this comment

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

here when there is only one line of styles you can:
${props => props.shaded && `box-shadow: ${SHADOW_1};`

@LeandroTorresSicilia LeandroTorresSicilia merged commit bf5844c into master Oct 10, 2019
@LeandroTorresSicilia LeandroTorresSicilia deleted the migrate-button-styled-components branch October 10, 2019 22:07
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