Cleaning up code and improving chip list.

This commit is contained in:
2025-09-24 14:31:07 -07:00
parent 1f26bf5b18
commit 449a5eb896
2 changed files with 20 additions and 42 deletions

10
chip.js
View File

@@ -1,6 +1,6 @@
import { IgniteHtml } from '../ignite-html/ignite-html.js';
import { IgniteElement } from "../ignite-html/ignite-element.js";
import { IgniteTemplate, slot, button, span } from "../ignite-html/ignite-template.js";
import { IgniteTemplate, slot, button, span, i } from "../ignite-html/ignite-template.js";
class Chip extends IgniteElement {
constructor() {
@@ -21,8 +21,8 @@ class Chip extends IgniteElement {
mt-chip {
border-radius: 1em;
background-color: #e0e0e0;
padding-top: 0.3em;
padding-bottom: 0.3em;
padding-top: 0.2em;
padding-bottom: 0.2em;
padding-left: 0.6em;
padding-right: 0.6em;
display: flex;
@@ -44,8 +44,8 @@ class Chip extends IgniteElement {
.child(
new slot(this),
new button()
.class("btn ml-2 p-0")
.child(`<i class="fal fa-times"></i>`)
.class("btn ms-2 p-0")
.child(new i().class("fa-solid fa-circle-x"))
.style("color", this.color)
.style("line-height", "1")
.style("border", "none")