/** * Section Title Component * Displays a title with an arrow right icon on the right side */ import { arrowRightIcon } from "../icons/arrow-right.js"; class SectionTitle extends HTMLElement { static get observedAttributes() { return ["text"]; } constructor() { super(); this.attachShadow({ mode: "open" }); } connectedCallback() { this.render(); } attributeChangedCallback() { if (this.shadowRoot) { this.render(); } } get text() { return this.getAttribute("text") || this.textContent || "Section Title"; } render() { this.shadowRoot.innerHTML = `

${this.text}

${arrowRightIcon({ size: 24, color: "currentColor" })}
`; } } customElements.define("section-title", SectionTitle);