3.0.0 • Published 3 years ago

@doubletrade/lit-dialog v3.0.0

Weekly downloads
55
License
ISC
Repository
github
Last release
3 years ago

lit-dialog

lit-dialog is a simple dialog web component.

Install

For dev purpose:

git clone git@github.com:DoubleTrade/lit-dialog.git

For user purpose:

npm install @doubleTrade/lit-dialog

Launch demo

npm run serve

Lint

npm run lint

Simple example

<lit-dialog title="Title" opened .html="This is a message">
</lit-dialog>
<lit-dialog opened .html="">
</lit-dialog>

API

Properties/Attributes

NameTypeDescription
openedBooleanOpen/close the dialog depending on boolean value
titleStringTitle of the dialog
htmlObjectContent to display, you can put a String, or a full HTML template
closeOnEscBooleanClose on Pressing ESCAPE key (default to false)
closeOnClickOutsideBooleanClose on Clicking Outside the dialog (default to false)
closeIconBooleanadd a close Icon (default to false)
primaryActionBooleanDisplay a button (default to false)
primaryActionLabelStringLabel of primary action (default to 'Ok')
secondaryActionBooleanDisplay a second button (default to false)
secondaryActionLabelStringLabel of primary action (default to 'Cancel')

Methods

NameDescription
open() => voidOpen the dialog
close() => voidClose the dialog

Events

NameTargetDetailDescription
opened-changedlit-dialog{value: Boolean}Fired when the dialog is opened or closed
primary-action-clickedlit-dialogFired when the primary action is clicked
secondary-action-clickedlit-dialogFired when the secondary action is clicked
3.0.0

3 years ago

2.12.0

3 years ago

2.11.0

3 years ago

2.9.0

3 years ago

2.7.0

3 years ago

2.6.0

3 years ago

2.8.0

3 years ago

2.5.0

3 years ago

2.4.0

3 years ago

2.3.1

3 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

5 years ago

0.0.1

5 years ago