UNPKG

@gf-ui/components

Version:
48 lines (43 loc) 1.97 kB
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client'; import { I as Icons } from './index2.js'; const svgData = {"name":"svg","type":"element","value":"","attributes":{"class":"icon","viewBox":"0 0 1024 1024","version":"1.1","xmlns":"http://www.w3.org/2000/svg","p-id":"5320","xmlns:xlink":"http://www.w3.org/1999/xlink"},"children":[{"name":"defs","type":"element","value":"","attributes":{},"children":[]},{"name":"path","type":"element","value":"","attributes":{"d":"M512 992C246.912 992 32 777.088 32 512 32 246.912 246.912 32 512 32c265.088 0 480 214.912 480 480 0 265.088-214.912 480-480 480zM480 256v352a32 32 0 0 0 64 0V256a32 32 0 0 0-64 0z m-16 528a48 48 0 1 0 96 0 48 48 0 0 0-96 0z","p-id":"5321"},"children":[]}],"_name":"test","_isColor":false}; const GfIcontest = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement { constructor() { super(); this.__registerHost(); this.size = 30; this.styles = {}; this.color = "#606266"; this.rotate = 0; this.spin = false; this.opacity = 1; } render() { const { size, styles, color, rotate, spin, opacity } = this; const hostStyles = { width: size + 'px', height: size + 'px' }; return (h(Host, { style: hostStyles }, h(Icons, Object.assign({}, { svgData, size, styles, color, rotate, spin, opacity })))); } }, [0, "gf-icon-test", { "size": [8], "styles": [16], "color": [1], "rotate": [2], "spin": [4], "opacity": [8] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["gf-icon-test"]; components.forEach(tagName => { switch (tagName) { case "gf-icon-test": if (!customElements.get(tagName)) { customElements.define(tagName, GfIcontest); } break; } }); } const GfIconTest = GfIcontest; const defineCustomElement = defineCustomElement$1; export { GfIconTest, defineCustomElement };