File "product-sale-badge.js"

Full Path: /home/warrior1/public_html/plugins/woocommerce/packages/woocommerce-blocks/build/product-sale-badge.js
File size: 1.68 KB
MIME-type: text/plain
Charset: utf-8

(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[30],{222:function(e,t,c){"use strict";c.r(t);var a=c(0),n=c(1),s=c(4),r=c.n(s),l=c(28),o=c(29),b=c(225),u=c(140),p=c(131),d=c(221),i=c(58);c(335),t.default=Object(i.withProductDataContext)(e=>{const{className:t,align:c}=e,{parentClassName:s}=Object(o.useInnerBlockLayoutContext)(),{product:i}=Object(o.useProductDataContext)(),m=Object(b.a)(e),j=Object(u.a)(e),O=Object(p.a)(e),w=Object(d.a)(e);if(!i.id||!i.on_sale)return null;const g="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(a.createElement)("div",{className:r()("wc-block-components-product-sale-badge",t,g,{[s+"__product-onsale"]:s},j.className,m.className),style:{...j.style,...m.style,...O.style,...w.style}},Object(a.createElement)(l.a,{label:Object(n.__)("Sale","woocommerce"),screenReaderLabel:Object(n.__)("Product on sale","woocommerce")}))})},225:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var a=c(5),n=c(95),s=c(37),r=c(176);const l=e=>{if(!Object(n.b)())return{className:"",style:{}};const t=Object(s.a)(e)?e:{},c=Object(r.a)(t.style);return Object(a.__experimentalUseBorderProps)({...t,style:c})}},28:function(e,t,c){"use strict";var a=c(0),n=c(4),s=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:r,wrapperProps:l={}}=e;const o=null!=c,b=null!=n;return!o&&b?(t=r||"span",l={...l,className:s()(l.className,"screen-reader-text")},Object(a.createElement)(t,l,n)):(t=r||a.Fragment,o&&b&&c!==n?Object(a.createElement)(t,l,Object(a.createElement)("span",{"aria-hidden":"true"},c),Object(a.createElement)("span",{className:"screen-reader-text"},n)):Object(a.createElement)(t,l,c))}},335:function(e,t){}}]);