mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-19 14:03:52 -04:00
Feat/webpack (#2998)
* First commit * Removed govuk for webpack. Modernized javascript importing. Removed dead js * Fixed tests, a few styling bugs * Fixed some table errors and regenerated backstop ref images * Updated tests for coverage * Changes from carlo suggestions
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
(function (window) {
|
||||
"use strict";
|
||||
export const ErrorBanner = {
|
||||
hideBanner: () => $('.banner-dangerous').addClass('display-none'),
|
||||
showBanner: () => $('.banner-dangerous').removeClass('display-none')
|
||||
};
|
||||
|
||||
/*
|
||||
This module is intended to be used to show and hide an error banner based on a javascript trigger. You should make
|
||||
sure the banner has an appropriate aria-live attribute, and a tabindex of -1 so that screenreaders and keyboard users
|
||||
are alerted to the change respectively.
|
||||
|
||||
This may behave in unexpected ways if you have more than one element with the `banner-dangerous` class on your page.
|
||||
*/
|
||||
window.NotifyModules.ErrorBanner = {
|
||||
hideBanner: () => $('.banner-dangerous').addClass('display-none'),
|
||||
showBanner: () => $('.banner-dangerous')
|
||||
.removeClass('display-none')
|
||||
};
|
||||
})(window);
|
||||
window.NotifyModules = window.NotifyModules || {};
|
||||
window.NotifyModules.ErrorBanner = ErrorBanner;
|
||||
|
||||
Reference in New Issue
Block a user