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

feat: add success, error and warning variants to the Chip compo… #1717

Conversation

rgah2107
Copy link
Collaborator

fix: #1713

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Jul 14, 2020

Features

  • add success, error and warning variants to the Chip component (e55cbdb)
  • add new variants to the examples (317c5b1)

Bug Fixes

Contributors

@rgah2107

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@@ -42,6 +42,27 @@ const StyledContainer = attachThemeAttrs(styled.span)`
border: 1px solid ${props.palette.brand.main};
color: ${props.palette.getContrastText(props.palette.brand.main)};
`};
${props =>
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

border: 1px solid ${props.palette.success.main};
color: ${props.palette.getContrastText(props.palette.success.main)};
`};
${props =>
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

border: 1px solid ${props.palette.warning.main};
color: ${props.palette.getContrastText(props.palette.warning.main)};
`};
${props =>
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

@TahimiLeonBravo
Copy link
Collaborator

@rgah2107 we should make the close button have the same color of the text (just like the brand variant)

Screen Shot 2020-07-13 at 11 01 27 PM

Screen Shot 2020-07-13 at 11 00 54 PM

Screen Shot 2020-07-13 at 11 01 11 PM

@TahimiLeonBravo
Copy link
Collaborator

@rgah2107 I think we should add the new variants to the examples

@codeclimate
Copy link

codeclimate bot commented Jul 14, 2020

Code Climate has analyzed commit 317c5b1 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Collaborator

@TahimiLeonBravo TahimiLeonBravo left a comment

Choose a reason for hiding this comment

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

+1

props.variant === 'brand' &&
`fill: ${props.palette.getContrastText(props.palette.brand.main)};`};
variants.includes(props.variant) &&
`fill: ${props.palette.getContrastText(props.palette[props.variant].main)};`};

Choose a reason for hiding this comment

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

Good job!!

@LeandroTorresSicilia LeandroTorresSicilia merged commit dfd408b into nexxtway:master Jul 15, 2020
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.

feat: add success, error and warning variants to the Chip component
3 participants