feat: set up status-indicator compontnt
This commit is contained in:
parent
34cd917871
commit
fee257cd15
3 changed files with 7 additions and 4 deletions
|
|
@ -4,9 +4,9 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Web Component Demo</title>
|
||||
<script type="module" src="./hello-world.ts"></script>
|
||||
<script type="module" src="./src/status-indicator.ts"></script>
|
||||
</head>
|
||||
<body>
|
||||
<hello-world></hello-world>
|
||||
<status-indicator></status-indicator>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Warning: no test specified\"",
|
||||
"build": "vite build",
|
||||
"dev": "vite",
|
||||
"prepare": "husky"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import { WebComponent, html } from 'web-component-base'
|
||||
|
||||
class HelloWorld extends WebComponent {
|
||||
class StatusIndicator extends WebComponent {
|
||||
get template(): any {
|
||||
return html`
|
||||
<h1>Hello, World!</h1>
|
||||
`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('status-indicator', StatusIndicator)
|
||||
Loading…
Reference in a new issue