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

Adds in error handling styling for filters. #333

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
29 changes: 18 additions & 11 deletions src/components/filters/_filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -368,19 +368,26 @@
span:not(.nsw-material-icons) {
display: flex;
align-items: center;
padding: 0;
}

.nsw-material-icons:last-child {
font-size: rem(map-get($nsw-icon-sizes, 20));
background-color: var(--nsw-white);
.nsw-material-icons {
font-size: rem(map-get($nsw-icon-sizes, 20));
margin-left: rem(8px);
border-radius: 50%;
width: rem(16px);
height: rem(16px);
display: flex;
justify-content: center;
align-items: center;

&--error {
background-color: var(--nsw-status-error-bg);
color: var(--nsw-status-error);
}

&--valid {
background-color: var(--nsw-status-success-bg);
color: var(--nsw-status-success);
margin-left: rem(8px);
border-radius: 50%;
width: rem(16px);
height: rem(16px);
display: flex;
justify-content: center;
align-items: center;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/filters/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Filters {
this.filtersItems = element.querySelectorAll('.nsw-filters__item')
/* eslint-disable max-len */
this.focusableEls = this.filtersWrapper.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])')
this.checkIcon = '<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">check_circle</span>'
this.checkIcon = '<span class="material-icons nsw-material-icons nsw-material-icons--valid" focusable="false" aria-hidden="true">check_circle</span>'
this.arrowIcon = '<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">keyboard_arrow_right</span>'
/* eslint-ensable max-len */
this.showEvent = (e) => this.showFilters(e)
Expand Down
Loading