Skip to content

feat: add new label variants and filled prop#125

Merged
duranmla merged 1 commit intomainfrom
feature/new-label-variants
Jun 28, 2021
Merged

feat: add new label variants and filled prop#125
duranmla merged 1 commit intomainfrom
feature/new-label-variants

Conversation

@snapsnapturtle
Copy link
Contributor

@snapsnapturtle snapsnapturtle commented Jun 23, 2021

What:
Adding new label color "info" and "warning" in addition to the ability to give all labels a more prominent style with the "filled" prop. Closes #2 .

Why:
Some of the recent designs include additional label styles that are used in tables across our tools. Currently they are Label components with custom styles. To provide a common and reusable pattern, we want to include these styles in the library.
​​
Media:
image

Checklist:

  • Ready to be merged

Other:
This will change the styling of the variant "info" from grey to blue, while introducing a new variant (default) to replace the grey styles. The change can lead to unexpected colours of the label when the variant is explicitly specified. It will not cause any issue when no variant is specified, as the default looks identical.

Copy link
Contributor

@duranmla duranmla left a comment

Choose a reason for hiding this comment

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

Thanks! 🙌

@rafael-sepeda
Copy link

Thanks!

@duranmla duranmla merged commit f28c797 into main Jun 28, 2021
@duranmla duranmla deleted the feature/new-label-variants branch June 28, 2021 12:41
expect(render(<Label variant="success" filled />).container.firstChild).toHaveStyle(`
color: ${Colors.WHITE};
border-color: ${Colors.POSITIVE_GREEN_900};
backgroundColor: ${Colors.POSITIVE_GREEN_900};
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be background-color.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry that it's in a different PR :( #138

github-actions bot pushed a commit that referenced this pull request Jun 28, 2021
## [1.7.0](v1.6.0...v1.7.0) (2021-06-28)

### Features

* add new label variants and filled prop ([#125](#125)) ([f28c797](f28c797))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Add and change variants for the Label component

4 participants