/* eslint-disable no-underscore-dangle, class-methods-use-this */ import { storiesOf, html } from '@open-wc/storybook'; import { css } from '@lion/core'; import { overlays } from '../src/overlays.js'; import { ModalDialogController } from '../src/ModalDialogController.js'; const modalDialogDemoStyle = css` .demo-overlay { background-color: white; position: fixed; top: 20px; left: 20px; width: 200px; border: 1px solid blue; } .demo-overlay--2 { left: 240px; } `; storiesOf('Overlay System|Global/Modal Dialog', module) .add('Default', () => { const dialogCtrl = overlays.add( new ModalDialogController({ contentTemplate: () => html`
`, }), ); 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` `, }), ); const normalDialogCtrl = overlays.add( new ModalDialogController({ contentTemplate: () => html` `, }), ); return html` `; });