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(badge): add badge component code #919

Merged
merged 6 commits into from Sep 14, 2021
Merged

feat(badge): add badge component code #919

merged 6 commits into from Sep 14, 2021

Conversation

mohamedMok
Copy link
Contributor

@mohamedMok mohamedMok commented Sep 13, 2021

I have read the contributing guidelines

  • Yes
  • No

Does this PR introduce a breaking change?

  • Yes
  • No

Describe the changes

GitHub issue number or Jira issue URL: https://jira.adeo.com/browse/MZC-130

Other information

@mohamedMok mohamedMok self-assigned this Sep 13, 2021
@mohamedMok mohamedMok added 🚀 feat A new feature scope:component Anything related to a component labels Sep 13, 2021
Comment on lines 21 to 27
@if map-has-key($props, 'border') {
border-color: map-get($props, 'border');
}

@if map-has-key($props, 'background') {
background-color: map-get($props, 'background');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@if map-has-key($props, 'border')
@if map-has-key($props, 'background')

As of there are no borderless versions of badges, it is not necessary to test for the presence of the value.
So you can directly write your code as follow:

@mixin set-badge-theme($props) {
  color: map-get($props, "text");
  border-color: map-get($props, "border");
  background-color: map-get($props, "background");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 feat A new feature scope:component Anything related to a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants