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: adding new badge variants and examples #1744

Merged
merged 4 commits into from
Jul 24, 2020

Conversation

TahimiLeonBravo
Copy link
Collaborator

fix: #1741

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Jul 23, 2020

Features

  • adding new badge variants and examples (edeefe8)
  • adding new badge variants and examples (86b76f4)

Contributors

@hportales2000, @TahimiLeonBravo

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

@@ -50,6 +50,24 @@ const StyledContainer = attchThemeAttrs(styled.span).attrs(props => {
color: ${props.palette.getContrastText(props.inverse)};
background-color: ${props.inverse};
`};
${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.

color: ${props.palette.getContrastText(props.palette.warning.main)};
background-color: ${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.

color: ${props.palette.getContrastText(props.palette.success.main)};
background-color: ${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.

Copy link
Collaborator Author

@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.

👍🏻

className="rainbow-m-around_medium"
label="Signal Badge"
title="the badge title"
style={{'color': 'white', 'backgroundColor': 'forestgreen', 'boxShadow': 'inset 0 0 0 1px'}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we should not add the styles inline instead create a const

className="rainbow-m-around_medium"
label="Floating Badge"
title="the badge title"
style={{'color': 'white', 'backgroundColor': 'lightsalmon', 'borderColor': 'darksalmon', 'boxShadow': 'gray 0 6px 16px -6px'}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

^^

className="rainbow-m-around_medium"
label="Desert Badge"
title="the badge title"
style={{'color': 'peru', 'backgroundColor': 'bisque',}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

^^

Comment on lines +39 to +41
'warning',
'success',
'error',
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to add this props in the declarations file (index.d.ts)

@codeclimate
Copy link

codeclimate bot commented Jul 24, 2020

Code Climate has analyzed commit 299437f and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

View more on Code Climate.

@TahimiLeonBravo TahimiLeonBravo merged commit ccdba17 into master Jul 24, 2020
@TahimiLeonBravo TahimiLeonBravo deleted the feat-badge-new-variants branch July 24, 2020 01:52
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 "warning", "error", "success" variant to the Badge component
4 participants