diff --git a/src/Checkout/Subtotal.css b/src/Checkout/Subtotal.css index e69de29..ef0938e 100644 --- a/src/Checkout/Subtotal.css +++ b/src/Checkout/Subtotal.css @@ -0,0 +1,16 @@ +.subtotal { + display: flex; + flex-direction: column; + justify-content: space-between; + width: 300px; + height: 100px; + padding: 20px; + background-color: #f3f3f3; + border: 1px solid #dddddd; + border-radius: 3px; +} + +.subtotal__gift { + display: flex; + align-items: center; +} diff --git a/src/Checkout/Subtotal.js b/src/Checkout/Subtotal.js index f2e94ce..5def393 100644 --- a/src/Checkout/Subtotal.js +++ b/src/Checkout/Subtotal.js @@ -1,8 +1,31 @@ import React from "react"; +import CurrencyFormat from "react-currency-format"; import "./Subtotal.css"; function Subtotal() { - return Subtotal; + return ( + + ( + <> + + Subtotal (0 items): 0 + + + This order contains a gift + + > + )} + decimalScale={2} + value={0} + displayType={"text"} + thousandSeparator={true} + prefix={"$"} + /> + + Proceed to Checkout + + ); } export default Subtotal;
+ Subtotal (0 items): 0 +