The discount component allows the user to enter and submit a discount code. By default, it consists of a title, a field, and a button. When a coupon is successfully added, it is displayed instead of the field, and the button changes to "Remove Coupon"
This component appears on the cart page.
There are 3 possible states:
Empty coupon code form
<aside> ℹ️ Usually, styling this element takes from-to: 2-5h
</aside>
Applied coupon code form
Issues with the designs
The renderDiscountCode
method of the CartPage
route renders the discount code.
CartCoupon
is responsible for rendering the discount input.