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

Remove small blue badge variant #235

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,9 @@ New icons added. [See full commit](https://github.com/nhsuk/nhsapp-frontend/comm

- New [Seconday Button](https://design-system.nhsapp.service.nhs.uk/components/buttons/) styling added
- New [Confirmation Panel](https://design-system.nhsapp.service.nhs.uk/components/panel/) component

## `v2.4.0` - UNRELEASED

### Components

- Updated [Badge](https://design-system.nhsapp.service.nhs.uk/components/badge/) - removing small blue variant
3 changes: 3 additions & 0 deletions docs/assets/css/_content.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.app-content {
img {
@include nhsuk-responsive-margin(5, "bottom");
@include nhsuk-responsive-margin(5, "top");

border: nhsuk-spacing(1) solid $app-img-border-color;
display: block; // To remove extra spacing beneath images
max-width: 100%; // So images do not break the container
Expand Down
11 changes: 3 additions & 8 deletions docs/components/badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,13 @@ Small badges are simple circles. They can be placed:
- on the edge of icons, such as on the bottom navigation
- on cards, alongside text, such as “Document attached” on appointment cards

{% example "badges/badge-small-red.njk" %}
{% example "badges/badge-small.njk" %}

The colour of small badges can be:

- red for important notifications that needs to stand out on a page
- blue for secondary notifications that can afford to be less prominent

For example, users will see a red badge on the bottom navigation to indicate unread messages.
We show a red badge on the bottom navigation to indicate unread messages.

![The bottom navigation menu with a red badge on the messages item to indicate unread messages.](/assets/images/bottom-nav-badge.png)

When they then navigate to their messages inbox to view those messages, unread message headings are indicated by blue badges.
When users then navigate to their messages inbox to view those messages, unread message headings are indicated by red badges.

{% example "cards/card-messages.njk" %}

Expand Down
15 changes: 0 additions & 15 deletions docs/examples/badges/badge-small-red.njk

This file was deleted.

8 changes: 1 addition & 7 deletions src/components/badge/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ $nhsapp-badge-size-tablet: 12px;
@include small-badge-position($nhsapp-badge-size-tablet);
}

background-color: $color_nhsuk-blue;
}

.nhsapp-badge-small--red {
.nhsapp-badge-small__indicator {
background-color: $nhsuk-error-color;
}
background-color: $nhsuk-error-color;
}

.nhsapp-badge-small--absolute {
Expand Down
1 change: 0 additions & 1 deletion src/components/badge/small/badge-small.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<span class="
nhsapp-badge-small
{{ 'nhsapp-badge-small--red' if params.color === 'red' }}
edwardscull marked this conversation as resolved.
Show resolved Hide resolved
{{ 'nhsapp-badge-small--absolute' if params.positionAbsolute }}
{{ params.classes if params.classes }}">
<span class="nhsapp-badge-small__indicator" aria-hidden="true"></span>
Expand Down
Loading