lit-heroicons
Advanced tools
Comparing version 0.5.2 to 0.5.3
import { html, LitElement } from "lit"; | ||
import { customElement, property } from "lit/decorators"; | ||
import icons from "./generated/heroicons.json"; | ||
import icons from "./heroicons.json"; | ||
import { HeroIconName } from "./generated/heroicons"; | ||
@@ -21,4 +21,25 @@ | ||
return ( | ||
icons?.[this.name.toLowerCase()]?.[this.solid ? 0 : 1] ?? | ||
html`<svg></svg>` | ||
// icons?.[this.name.toLowerCase()]?.[this.solid ? 0 : 1] ?? | ||
html`${this.solid | ||
? html`<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 20 20" | ||
fill="currentColor" | ||
class="heroicon solid" | ||
> | ||
${icons[this.name.toLowerCase()][1].map((e) => { | ||
html`<path ${e}></path>`; | ||
})} | ||
</svg>` | ||
: html`<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke="currentColor" | ||
class="outline heroicon" | ||
> | ||
${icons[this.name.toLowerCase()][0].map((e) => { | ||
html`<path ${e}></path>`; | ||
})} | ||
</svg>`}` | ||
); | ||
@@ -25,0 +46,0 @@ } |
{ | ||
"name": "lit-heroicons", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Heroicons for Lit (Project based on heroicons)", | ||
@@ -5,0 +5,0 @@ "main": "heroicon.ts", |
178024
1796