emergency-banner--tdtest
v2.0.0
Published
In house solution for managing the emergency banner on nhs.uk
Downloads
1
Readme
#Emergency banner
In house solution for managing the emergency banner on nhs.uk.
Usage
This code should be consumed via NPM. You should already be using NPM to consume the nhsuk-frontend library via a build tool such as Gulp or Webpack.
npm install @nhsuk-emergency-banner --save
CSS
The styles for the banner are no longer included in nhsuk-frontend. You will need to add them to your relevant SCSS compilation task.
@import 'node_modules/@nhsuk-nhsuk-banner/src/scss/emergency-alert';
JavaScript
The JavaScript in this repository is written in ES6. For production use it must be transpiled to ES5. This process should be handled by your build tools.
node_modules/nhsuk-banner/src/js/banner.js
Development
Application
npm install
npm start
Go to http://localhost:3000/ to open a small app which contains an example page for emergency banner and feedback banner.
Tests
npm test
Tests are written in Jest and use JSDom to simulate browser behaviour.