Socket
Book a DemoInstallSign in
Socket

@doubletrade/lit-dialog

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doubletrade/lit-dialog

lit-dialog provides a basic dialog written in LitElement.

3.0.0
latest
Source
npmnpm
Version published
Weekly downloads
8
700%
Maintainers
3
Weekly downloads
 
Created
Source

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

Keywords

web-component

FAQs

Package last updated on 12 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.