2.0.0 • Published 3 years ago

emergency-banner--tdtest v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

#Emergency banner Master

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.