import { storiesOf, html } from '@open-wc/demoing-storybook'; import { fixtureSync } from '@open-wc/testing-helpers'; import { css } from '@lion/core'; import { OverlayController, withModalDialogConfig } 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 = new OverlayController({ ...withModalDialogConfig(), contentNode: fixtureSync(html`

Nested modal dialog

`), }); const dialogCtrl = new OverlayController({ ...withModalDialogConfig(), contentNode: fixtureSync(html`

Modal dialog

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

Lorem ipsum

`, )} `; }) .add('Option "isBlocking"', () => { const blockingDialogCtrl = new OverlayController({ ...withModalDialogConfig(), isBlocking: true, viewportConfig: { placement: 'top', }, contentNode: fixtureSync(html`

Hides other dialogs

`), }); const normalDialogCtrl = new OverlayController({ ...withModalDialogConfig(), contentNode: fixtureSync(html`

Normal dialog

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