UNPKG

@shopgate/engage

Version:
23 lines (22 loc) 609 B
import React, { useMemo } from 'react'; import PropTypes from 'prop-types'; import { i18n } from '@shopgate/engage/core'; import styles from "./CartItemCouponTitle.style"; /** * The CouponTitle component. * @param {Object} props The component properties. * @returns {JSX} */ import { jsx as _jsx } from "react/jsx-runtime"; export function CartItemCouponTitle({ value }) { const title = useMemo(() => value || i18n.text('cart.default_coupon_label'), [value]); return /*#__PURE__*/_jsx("div", { className: styles, children: title }); } CartItemCouponTitle.defaultProps = { value: null };