Skip to content

Commit

Permalink
Use USWDS icons with badge component (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored May 7, 2024
1 parent d3c6c0d commit 87081ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
### Improvements

- Update styling for Alert component for increased contrast and consistency with U.S. Web Design System. ([#439](https://github.com/18F/identity-design-system/pull/439))
- Update markup for badge component to use U.S. Web Design System icons. ([#442](https://github.com/18F/identity-design-system/pull/442))
- Existing usage will not be affected until the next major release (see "Deprecations").

### Deprecations

- Badge component markup has been updated and will be required in the next major release. ([#442](https://github.com/18F/identity-design-system/pull/442))
- Custom alert icons will be removed in the next major release, use U.S. Web Design System alerts instead.
- `alerts/error.svg`
- `alerts/info.svg`
Expand Down
8 changes: 6 additions & 2 deletions docs/_components/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ The unphishable badge is used to indicate that an account is only using security

{% capture example %}
<div class="lg-verification-badge">
<img src="{{ site.baseurl }}/assets/img/alerts/unphishable.svg" role="img" width="16" height="16" alt="" />
<svg class="usa-icon text-success" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{{ site.baseurl }}/assets/img/sprite.svg#lock"></use>
</svg>
Unphishable
</div>
{% endcapture %}
Expand All @@ -26,7 +28,9 @@ A verfied account badge is used to indicate that an account has completed the id

{% capture example %}
<div class="lg-verification-badge">
<img src="{{ site.baseurl }}/assets/img/alerts/success.svg" role="img" width="16" height="16" alt="" />
<svg class="usa-icon text-success" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{{ site.baseurl }}/assets/img/sprite.svg#check_circle"></use>
</svg>
Verified Account
</div>
{% endcapture %}
Expand Down
3 changes: 2 additions & 1 deletion src/scss/packages/usa-verification-badge/src/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
padding: units(1) units(2);
white-space: nowrap;

img {
img, // BREAKING: Remove `img` in next major release
svg {
margin-right: units(1);
}
}

0 comments on commit 87081ec

Please sign in to comment.