npm.io
2.1.0 • Published 4 years ago

lit-badge

Licence
ISC
Version
2.1.0
Deps
0
Size
122 kB
Vulns
0
Weekly
0

Badge | Lit + Lightning DS

Install

npm install lit-badge

Use

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

  <body>
    <my-badge> </my-badge>
  </body>
</html>
  1. JS
import { MyBadge } from "node_modules/lit-badge/index.js"
Parameters
  • type: "success" | "error"
Example
<!DOCTYPE html>
<html lang="en">

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

<body>
    <my-badge type="success">
      Ativado
    </my-badge>
</body>

</html>