FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
components
Edit File: sc-product-text.js
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{s as state}from"./watchers.js";const scProductTextCss=":host{display:block}p{margin-block-start:0;margin-block-end:1em}",ScProductTextStyle0=scProductTextCss,ScProductText$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.text="name",this.productId=void 0}render(){var t;const e=null===(t=state[this.productId])||void 0===t?void 0:t.product;return(null==e?void 0:e[this.text])?h("span",{style:{whiteSpace:"pre-line"},innerHTML:e[this.text]}):h(Host,null,h("slot",null))}static get style(){return ScProductTextStyle0}},[1,"sc-product-text",{text:[1],productId:[1,"product-id"]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["sc-product-text"].forEach((t=>{"sc-product-text"===t&&(customElements.get(t)||customElements.define(t,ScProductText$1))}))}const ScProductText=ScProductText$1,defineCustomElement=defineCustomElement$1;export{ScProductText,defineCustomElement};
Save
Back