@cfware/dialog

Dialog overlays

Usage no npm install needed!

<script type="module">
  import cfwareDialog from 'https://cdn.skypack.dev/@cfware/dialog';
</script>

README

@cfware/dialog NPM Version

Dialog overlays

Usage

import {html} from '@cfware/shadow-element';
import {dialogAlert, dialogConfirm} '@cfware/dialog';

async function showAlert() {
    await dialogAlert('Title', html`<div>html tagged template</div>`);
    console.log('dialog closed');
}

async function showConfirm() {
    const result = await dialogConfirm('Continue', html`<div>Decide</div>`);
    console.log(result ? 'confirmed' : 'canceled');
}