GDS-style guide pattern implementation
npm install storm-guideGDS-style guide pattern implementation
One
Two
Three
`JS
`
npm i -S storm-guide
`
either using es6 import
`
import Guide from 'storm-guide';Guide.init();
`
aynchronous browser loading (use the .standalone version in the /dist folder)
`
import Load from 'storm-load';Load('/content/js/async/storm-guide.standalone.js')
.then(() => {
StormGuide.init();
});
`Options
`
{
linkClassName: '.js-guide__link',
sectionClassName: '.js-guide__section',
incrementalNavHolder: '.js-guide__incremental',
activeClassName: 'active'
}
`e.g.
`
Guide.init({
activeClassName: 'current'
});
`Tests
`
npm run test
``Browser support
This is module has both es6 and es5 distributions. The es6 version should be used in a workflow that transpiles.This module depends upon Object.assign available in all evergreen browsers. ie9+ is supported with polyfills, ie8+ will work with even more polyfills for Array functions and eventListeners.
Dependencies
NoneLicense
MIT