@shopgate/engage
Version:
Shopgate's ENGAGE library.
4 lines • 951 B
JavaScript
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import React from'react';import{themeConfig}from'@shopgate/engage';import{useWidgetSettings}from'@shopgate/engage/core/hooks';import{Icon,CartCouponIcon}from'@shopgate/engage/components';/**
* Renders the cart item coupon icon.
* @returns {JSX}
*/export var CartItemCouponIcon=function CartItemCouponIcon(){var _useWidgetSettings=useWidgetSettings('@shopgate/engage/components/CartCouponIcon'),viewBox=_useWidgetSettings.viewBox,color=_useWidgetSettings.color;if(!themeConfig.icons.cartCoupon){return React.createElement(CartCouponIcon,null);}return React.createElement(Icon,_extends({},viewBox&&{viewBox:viewBox},{content:themeConfig.icons.cartCoupon,color:color}));};