@@ -28,9 +28,9 @@ const initialCart: CartItemProps[] = [
2828
2929export default function Cart ( ) {
3030 return (
31- < >
31+ < div className = "min-h-screen flex flex-col" >
3232 < Header />
33- < main className = "flex flex-col w-full py-8 px-16" >
33+ < main className = "flex-1 w-full py-8 px-16" >
3434 < section className = "flex flex-col gap-4" >
3535 { /* <AnimatePresence>
3636 {showMessage && (
@@ -66,13 +66,13 @@ export default function Cart() {
6666 </motion.div>
6767 )}
6868 </AnimatePresence> */ }
69- < div className = "py-16 flex justify-center items-center" >
70- < h1 className = "text-3xl font-bold " > Shopping Cart</ h1 >
69+ < div className = "py-24 flex justify-center items-center" >
70+ < h1 className = "text-4xl font-heading uppercase " > Shopping Cart</ h1 >
7171 </ div >
72- < div className = "flex justify-between gap-8" >
72+ < h1 className = "text-xl font-bold" > Your Cart</ h1 >
73+ < div className = "flex justify-between gap-8 relative" >
7374 < div className = "w-full flex flex-col gap-4" >
74- < h1 className = "text-xl font-bold" > Your Cart</ h1 >
75- < div className = "outline-4 border border-foreground/10 rounded-full outline-primary-foreground p-4 flex sticky top-0" >
75+ < div className = "outline-4 border border-foreground/10 rounded-full outline-primary-foreground flex justify-between p-4 bg-background sticky top-8 z-10 items-center" >
7676 < div >
7777 < label className = "flex items-center gap-2 cursor-pointer" >
7878 < Input
@@ -85,6 +85,12 @@ export default function Cart() {
8585 </ span >
8686 </ label >
8787 </ div >
88+ < Button
89+ size = "lg"
90+ className = "rounded-full hover:bg-primary-foreground/80 hover:text-foreground cursor-pointer w-12 h-12"
91+ aria-label = "Remove from cart" >
92+ < i className = "fa-regular fa-trash" > </ i >
93+ </ Button >
8894 </ div >
8995 < div className = "flex flex-col rounded-4xl overflow-hidden outline-4 outline-primary-foreground border border-foreground/10 bg-background px-4" >
9096 < CartItem
@@ -103,35 +109,39 @@ export default function Cart() {
103109 />
104110 </ div >
105111 </ div >
106- < div className = "basis-5/12 h-min p-4 sticky top-0 outline-4 outline-primary-foreground rounded-4xl mt-12 border-foreground/10 border" >
107- < h1 className = "text-xl font-bold" > Order Summary</ h1 >
108- < div className = "flex flex-col gap-4 pt-4" >
109- < div className = "flex justify-between" >
110- < span className = "text-muted-foreground font-medium" >
111- Subtotal
112- </ span >
113- < span className = "font-medium" > $23</ span >
114- </ div >
115- < div className = "flex justify-between" >
116- < span className = "text-muted-foreground font-medium" >
117- Delivery fee
118- </ span >
119- < span className = "font-medium" > $23</ span >
120- </ div >
121- < Separator className = "bg-primary-foreground" />
122- < div className = "flex justify-between" >
123- < span className = "font-bold" > Total</ span >
124- < span className = "font-bold" > $23</ span >
112+ < div className = "basis-5/12" >
113+ < div className = "p-4 outline-4 outline-primary-foreground rounded-4xl border-foreground/10 border bg-background sticky top-32" >
114+ < h1 className = "text-xl font-bold" >
115+ Order Summary
116+ </ h1 >
117+ < div className = "flex flex-col gap-4 pt-4" >
118+ < div className = "flex justify-between" >
119+ < span className = "text-muted-foreground font-medium" >
120+ Subtotal
121+ </ span >
122+ < span className = "font-medium" > $23</ span >
123+ </ div >
124+ < div className = "flex justify-between" >
125+ < span className = "text-muted-foreground font-medium" >
126+ Delivery fee
127+ </ span >
128+ < span className = "font-medium" > $23</ span >
129+ </ div >
130+ < Separator className = "bg-primary-foreground" />
131+ < div className = "flex justify-between" >
132+ < span className = "font-bold" > Total</ span >
133+ < span className = "font-bold" > $23</ span >
134+ </ div >
135+ < Button className = "p-7 rounded-full cursor-pointer" >
136+ Go to Checkout
137+ </ Button >
125138 </ div >
126- < Button className = "p-7 rounded-full cursor-pointer" >
127- Go to Checkout
128- </ Button >
129139 </ div >
130140 </ div >
131141 </ div >
132142 </ section >
133143 </ main >
134144 < Footer />
135- </ >
145+ </ div >
136146 ) ;
137147}
0 commit comments