UNPKG

@alegendstale/holly-components

Version:

Reusable UI components created using lit

13 lines (12 loc) 418 B
import { customElement as litCustomElement } from "lit/decorators.js"; /** * Registers a new custom element if it doesn't already exist. * @param tagName The tag name of the custom element to define. */ export function condCustomElement(tagName) { return function (constructor) { if (!customElements.get(tagName)) litCustomElement(tagName)(constructor); return constructor; }; }