mirror of
https://github.com/vercel/commerce.git
synced 2025-07-21 11:51:20 +00:00
✨ feat: Delivery Item
This commit is contained in:
parent
717ff0fa27
commit
06fc9cb288
@ -22,7 +22,7 @@ const DeliveryItem = ({ id, status, products, totalPrice, reOrderLink } : Delive
|
||||
<div className={s.separator}></div>
|
||||
<Products products={products} />
|
||||
<TotalPrice totalPrice={totalPrice} />
|
||||
<ReOrder show={status==="delivered" ? "show" : ""} href={reOrderLink} />
|
||||
<ReOrder show={status==="delivered" ? true : false} href={reOrderLink} />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
background-color: var(--info-dark);
|
||||
}
|
||||
&.delivered {
|
||||
background-color: var(--positive);
|
||||
background-color: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
@import '../../../../../../styles/utilities';
|
||||
|
||||
.reOrder {
|
||||
@apply text-white custom-border-radius hidden;
|
||||
@apply text-white custom-border-radius hidden font-bold;
|
||||
padding: .8rem 1.2rem;
|
||||
margin-right: 2.4rem;
|
||||
background-color: var(--positive);
|
||||
background-color: var(--primary);
|
||||
|
||||
&.show {
|
||||
@apply block;
|
||||
|
@ -3,16 +3,15 @@ import React from "react"
|
||||
import s from './ReOrder.module.scss'
|
||||
import Link from 'next/link'
|
||||
|
||||
|
||||
interface ReOrderProps {
|
||||
show: string;
|
||||
show: boolean;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
const ReOrder = ({ show="", href="#" } : ReOrderProps) => {
|
||||
const ReOrder = ({ show=false, href="#" } : ReOrderProps) => {
|
||||
return (
|
||||
<div className={classNames(s.reOrder, {
|
||||
[s[show]]: show
|
||||
[s.show]: show
|
||||
})}>
|
||||
<Link href={href}>
|
||||
<a>Re-Order</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user