import { storiesOf, html } from '@open-wc/demoing-storybook'; import { css } from '@lion/core'; import { overlays, ModalDialogController } from '../index.js'; const modalDialogDemoStyle = css` .demo-overlay { background-color: white; width: 200px; border: 1px solid lightgrey; } `; storiesOf('Global Overlay System|Modal Dialog', module) .add('Default', () => { const nestedDialogCtrl = overlays.add( new ModalDialogController({ contentTemplate: () => html`

Nested modal dialog

`, }), ); const dialogCtrl = overlays.add( new ModalDialogController({ contentTemplate: () => html`

Modal dialog

`, }), ); return html` Anchor 1 Anchor 2 ${Array(50).fill( html`

Lorem ipsum

`, )} `; }) .add('Option "isBlocking"', () => { const blockingDialogCtrl = overlays.add( new ModalDialogController({ isBlocking: true, contentTemplate: () => html`

Hides other dialogs

`, }), ); const normalDialogCtrl = overlays.add( new ModalDialogController({ contentTemplate: () => html`

Normal dialog

`, }), ); return html` `; });