Skip to content

Commit

Permalink
update: reservation state ui update
Browse files Browse the repository at this point in the history
  • Loading branch information
huangfishburger committed May 25, 2024
1 parent dd534d5 commit a8c1373
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/image-card/reservation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ export default function Reservation({
>
<h1 className="line-clamp-2 w-full font-semibold">{name}</h1>
<span className="text-sm text-muted-foreground">
${price * quantity} · {status}
${price * quantity} ·{" "}
<span
className={`rounded-full px-2 ${status === "finished" ? "bg-green-100 text-green-500" : status === "waiting" ? "bg-orange-100 text-orange-500" : status === "cancelled" ? "bg-red-100 text-red-500" : "bg-purple-100 text-purple-500"}`}
>
{status}
</span>
</span>

<Badge className="mx-2 shadow-sm" variant={"outline"}>
Expand Down
4 changes: 3 additions & 1 deletion src/components/reservation-action-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export function ReservationActionCard({
<div className="flex items-center gap-x-2 lg:gap-x-8">
<p className="text-lg font-bold lg:text-2xl">{name}</p>
</div>
<div className="text-md pt-2 font-normal text-muted-foreground lg:pt-4 lg:text-lg">
<div
className={`text-md rounded-full px-2 font-normal text-muted-foreground lg:text-lg ${status === "finished" ? "bg-green-100 text-green-500" : status === "waiting" ? "bg-orange-100 text-orange-500" : status === "cancelled" ? "bg-red-100 text-red-500" : "bg-purple-100 text-purple-500"}`}
>
{status}
</div>
</div>
Expand Down

0 comments on commit a8c1373

Please sign in to comment.