A Menu Button component with open/closed state made with:
- Web Components
- CSS Modules
- SCSS
- Webpack
Live demo here
<menu-button>
<span slot="label">
Menu
</span>
</menu-button>
- Clone the repo locally
- From the local folder, run
npm installto install dependencies
- Run
npm run build-devto initialise awebpack-dev-server, which will hot-reload if the contents of/src/are changed.
- Run
npm run build-prodto bundle the app withwebpack- the generatedbundle.jswill be placed in/dist/.
NOTE: the index.html will be copied from
/src/to/dist/whenbuild-prodorbuild-devare initially run, but changes toindex.htmlwill not trigger a hot-reload from the dev-server.
