Skip to content

Commit

Permalink
update the importing JavaScript documentation with new import names
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimesdev committed Oct 23, 2019
1 parent e741a7b commit 351c9b3
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions docs/installation/installing-with-npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,16 @@ If you're using a transpiler or bundler such as [Babel](https://babeljs.io/) or

```javascript
// Components
import nhsuk_header from 'node_modules/nhsuk-frontend/packages/components/header/header';
import nhsuk_skipLink from 'node_modules/nhsuk-frontend/packages/components/skip-link/skip-link';
import autocomplete from 'node_modules/nhsuk-frontend/packages/components/header/autocomplete';

// HTML5 polyfills
import 'node_modules/nhsuk-frontend/packages/components/details/details.polyfill';
import Header from './components/header/header';
import SkipLink from './components/skip-link/skip-link';
import Details from './components/details/details';

// Initialize components
document.addEventListener('DOMContentLoaded', function() {
nhsuk_header();
nhsuk_skipLink();
autocomplete();
})
document.addEventListener('DOMContentLoaded', () => {
Details();
Header();
SkipLink();
});
```

## Importing assets (optional)
Expand Down

0 comments on commit 351c9b3

Please sign in to comment.