Skip to content

cfware/dialog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6510c12 · Oct 17, 2023

History

14 Commits
Oct 17, 2023
Sep 26, 2020
Sep 26, 2020
Sep 26, 2020
Sep 26, 2020
Oct 17, 2023
Sep 26, 2020
Sep 26, 2020
Oct 17, 2023
Oct 17, 2023

Repository files navigation

@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');
}