Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cfware/dialog

Dialog overlays
https://github.com/cfware/dialog

Last synced: 29 days ago
JSON representation

Dialog overlays

Awesome Lists containing this project

README

        

# @cfware/dialog [![NPM Version][npm-image]][npm-url]

Dialog overlays

## Usage

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

async function showAlert() {
await dialogAlert('Title', html`

html tagged template
`);
console.log('dialog closed');
}

async function showConfirm() {
const result = await dialogConfirm('Continue', html`

Decide
`);
console.log(result ? 'confirmed' : 'canceled');
}

```

[npm-image]: https://img.shields.io/npm/v/@cfware/dialog.svg
[npm-url]: https://npmjs.org/package/@cfware/dialog