willy-dialog
v1.0.6
Published
Dialog script
Downloads
16
Readme
Dialog
Makkelijk een dialog opzetten die geopend wordt door een button
Installatie
npm install willy-dialog --save
yarn add willy-dialog
Implementatie voorbeeld
Zorg dat je de polyfill javascript toevoegt in je project. De css is niet nodig https://github.com/GoogleChrome/dialog-polyfill/blob/master/index.js
Javascript
import initDialogs from 'willy-dialog';
/**
* Init default dialog adhv data attributen
*/
initDialogs();
SCSS
@import './../../../node_modules/willy-dialog/scss/dialog';
Html
<button data-dialog-open="foo">Open dialog</button>
<dialog data-dialog="foo">Dialog content</dialog>