nve-designsystem 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
2
1
|
import { css, html, LitElement } from 'lit';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -6,13 +5,21 @@ import { css, html, LitElement } from 'lit';
|
|
|
6
5
|
* Vi bruker ikoner fra Material Symbols.
|
|
7
6
|
* @see https://fonts.google.com/icons
|
|
8
7
|
*/
|
|
9
|
-
@customElement('nve-icon')
|
|
10
8
|
export class NveIcon extends LitElement {
|
|
11
9
|
|
|
10
|
+
declare name: string;
|
|
11
|
+
static properties = {
|
|
12
|
+
name: { type: String }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.name = '';
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
/**
|
|
13
21
|
* Navnet på ikonet i Material Symbols-biblioteket
|
|
14
22
|
*/
|
|
15
|
-
@property() name = '';
|
|
16
23
|
static styles = css`
|
|
17
24
|
:host {
|
|
18
25
|
/* Apply Material Icons font-family to the Shadow DOM */
|
|
@@ -28,6 +35,8 @@ export class NveIcon extends LitElement {
|
|
|
28
35
|
return html`<span class="material-symbols-outlined">${this.name}</span>`;
|
|
29
36
|
}
|
|
30
37
|
}
|
|
38
|
+
|
|
39
|
+
customElements.define('nve-icon', NveIcon);
|
|
31
40
|
declare global {
|
|
32
41
|
interface HTMLElementTagNameMap {
|
|
33
42
|
'nve-icon': NveIcon;
|