mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2024-04-21 12:32:08 +00:00
17 lines
491 B
JavaScript
17 lines
491 B
JavaScript
import { loadCSS } from "../helpers/loader.js";
|
|
|
|
export default class ComponentFab extends window.HTMLButtonElement {
|
|
constructor() {
|
|
super();
|
|
this.innerHTML = `<div class="content"></div>`;
|
|
this.classList.add("component_fab");
|
|
}
|
|
|
|
async render($icon) {
|
|
await loadCSS(import.meta.url, "./fab.css");
|
|
this.querySelector(".content").replaceChildren($icon);
|
|
}
|
|
}
|
|
|
|
customElements.define("component-fab", ComponentFab, { extends: "button" });
|