/**
* Book Open Icon Web Component
* An open book icon
*/
class BookOpenIcon extends HTMLElement {
static get observedAttributes() {
return ["size", "color", "stroke-width"];
}
constructor() {
super();
this.attachShadow({ mode: "open" });
}
connectedCallback() {
this.render();
}
attributeChangedCallback() {
this.render();
}
get size() {
return this.getAttribute("size") || "48";
}
get color() {
return this.getAttribute("color") || "currentColor";
}
get strokeWidth() {
return this.getAttribute("stroke-width") || "1";
}
render() {
this.shadowRoot.innerHTML = `
`;
}
}
customElements.define("book-open-icon", BookOpenIcon);