UNPKG

@shopgate/engage

Version:
26 lines (25 loc) 707 B
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} */ import { jsx as _jsx } from "react/jsx-runtime"; export const CartItemCouponIcon = () => { const { viewBox, color } = useWidgetSettings('@shopgate/engage/components/CartCouponIcon'); if (!themeConfig.icons.cartCoupon) { return /*#__PURE__*/_jsx(CartCouponIcon, {}); } return /*#__PURE__*/_jsx(Icon, { ...(viewBox && { viewBox }), content: themeConfig.icons.cartCoupon, color: color }); };