lion/packages/dialog
CircleCI aa7ff4c37e chore: release new versions
- @lion/dialog@0.3.0
 - @lion/input-datepicker@0.7.0
 - @lion/overlays@0.9.0
 - @lion/popup@0.4.7
 - @lion/select-rich@0.8.4
 - @lion/tooltip@0.5.1
2019-12-11 15:33:42 +00:00
..
src fix: deleted obsolete overlay event names 2019-12-11 15:51:37 +01:00
stories feat(overlays): close/hide events on dom (OverlayMixin) level 2019-12-11 15:51:06 +01:00
test fix: no longer use overlay templates 2019-12-01 16:03:04 +01:00
CHANGELOG.md chore: release new versions 2019-12-11 15:33:42 +00:00
index.js feat: refactor the overlay system implementations, docs and demos 2019-11-29 17:32:31 +01:00
lion-dialog.js feat: refactor the overlay system implementations, docs and demos 2019-11-29 17:32:31 +01:00
package.json chore: release new versions 2019-12-11 15:33:42 +00:00
README.md chore: fix typo in docs; no autocomplete show overlay in story 2019-11-29 17:34:49 +01:00

Dialog

lion-dialog is a component wrapping a modal dialog controller Its purpose is to make it easy to use our Overlay System declaratively With regards to modal dialogs, this is one of the more commonly used examples of overlays.

Features

  • Show content when clicking the invoker
  • Respond to close event in the slot="content" element, to close the content
  • Have a .config object to set or update the OverlayController's configuration

How to use

Installation

npm i --save @lion/dialog
import '@lion/dialog/lion-dialog.js';

Example

html`
  <lion-dialog.config=${{
    viewportConfig: { placement: 'bottom-right' },
  }}>
    <div slot="content">
      This is a dialog
      <button
        @click=${e => e.target.dispatchEvent(new Event('dialog-close', { bubbles: true }))}
      >x</button>
    <div>
    <button slot="invoker">
      Click me
    </button>
  </lion-dialog>
`;