-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
feat: add success
, error
and warning
variants to the Chip compo…
#1717
Conversation
Features
Bug Fixes
ContributorsCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this 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 => |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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.
@rgah2107 we should make the close button have the same color of the text (just like the brand variant) |
@rgah2107 I think we should add the new variants to the examples |
Code Climate has analyzed commit 317c5b1 and detected 0 issues on this pull request. View more on Code Climate. |
There was a problem hiding this 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)};`}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!!
fix: #1713
Changes proposed in this PR:
add
success
,error
andwarning
variants to the Chip componentI have followed (at least) the PR section of the contributing guide.
@nexxtway/react-rainbow