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`
`), }); const dialogCtrl = new OverlayController({ ...withModalDialogConfig(), contentNode: fixtureSync(html` `), }); 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` `), }); const normalDialogCtrl = new OverlayController({ ...withModalDialogConfig(), contentNode: fixtureSync(html` `), }); return html` `; });