UNPKG

@neu-ui/web-components

Version:

A Neumorphic web component library built with @microsoft/fast-element and Vite using javascript

47 lines (46 loc) 1.13 kB
import { FASTElement as s } from "@microsoft/fast-element"; import { ButtonDefinition as r } from "./button.definition.es.js"; class t extends s { static get observedAttributes() { return [ "disabled", "expand", "size", "aria-label", "aria-labelledby", "aria-describedby" ]; } constructor() { super(), this.disabled = !1, this.expand = !1, this.size, this.ariaLabel = "", this.ariaLabelledby = "", this.ariaDescribedby = ""; } attributeChangedCallback(e, i, a) { if (i !== a) { switch (e) { case "disabled": this.disabled = a !== null; break; case "expand": this.expand = a !== null; break; case "size": this.size = a; break; case "aria-label": this.ariaLabel = a; break; case "aria-labelledby": this.ariaLabelledby = a; break; case "aria-describedby": this.ariaDescribedby = a; break; } super.attributeChangedCallback(e, i, a); } } } s.define(t, r); export { t as Button };