add new error banner module for showing users js errors

this ensures it's reusable by other components, and easier to unit test
by isolating the separate concerns

note: this is not in Modules since that's designed for classes that are
then bound to an element in the DOM as indicated by a data-module
attribute. This will just live at the window.GOVUK level since we want
there to only ever be one `.banner-dangerous` warning.
This commit is contained in:
Leo Hemsted
2021-07-20 12:14:10 +01:00
parent c42fc071b5
commit c96a1dc0b7
3 changed files with 60 additions and 0 deletions

View File

@@ -182,6 +182,7 @@ const javascripts = () => {
paths.src + 'javascripts/registerSecurityKey.js',
paths.src + 'javascripts/authenticateSecurityKey.js',
paths.src + 'javascripts/updateStatus.js',
paths.src + 'javascripts/errorBanner.js',
paths.src + 'javascripts/homepage.js',
paths.src + 'javascripts/main.js',
])