1.3.0 • Published 2 years ago

lit-alert v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Alert | Lit + Lightning DS

Install

npm install lit-alert

Use

  1. HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <script type="module" src="node_modules/lit-alert/alert.js"></script>
  </head>

  <body>
    <my-alert> </my-alert>
  </body>
</html>
  1. JS
import { MyAlert } from "node_modules/lit-alert/alert.js"

Parameters

  • type: "warning" | "error" | "off"

Example

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Alert test</title>
    <script type="module" src="node_modules/lit-alert/alert.js"></script>
</head>

<body>
    <my-alert type="warning">
      Preencha todos os campos!
    </my-alert>
</body>

</html>