Skip to content

Commit

Permalink
fix: 🐛 ensure that icons have correctly bg
Browse files Browse the repository at this point in the history
  • Loading branch information
neopromic committed Nov 12, 2024
1 parent 2349d3e commit ec7672f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const PercentageItem = ({ icon, title, value }: PercentageItemProps) => {
<div className="flex items-center justify-between">
{/* Icone */}
<div className="flex items-center gap-2">
{icon}
<div className="rounded-lg bg-white bg-opacity-[3%] p-2">{icon}</div>
<p>{title}</p>
</div>
<p className="text-sm font-bold">{value}%</p>
Expand Down
8 changes: 3 additions & 5 deletions app/(authenticated)/dashboard/_components/summar-card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import AddTransactionButton from "@/app/_components/add-transaction-button";
import { Card, CardContent, CardHeader } from "@/app/_components/ui/card";
import { cn } from "@/app/_lib/utils";
import formatCurrency from "@/app/_utils/currency";

interface SummaryCardProps {
title: string;
Expand All @@ -18,7 +19,7 @@ const SummaryCard = ({
return (
<Card className={`${size === "lg" ? "bg-white bg-opacity-10" : ""}`}>
<CardHeader className="flex-row items-center gap-2">
{icon}
<div className="rounded-lg bg-white bg-opacity-[3%] p-2">{icon}</div>
<p
className={cn(
"text-muted-foreground",
Expand All @@ -30,10 +31,7 @@ const SummaryCard = ({
</CardHeader>
<CardContent className="flex justify-between">
<p className={`font-bold ${size === "sm" ? "text-2xl" : "text-4xl"}`}>
{Intl.NumberFormat("pt-BR", {
style: "currency",
currency: "BRL",
}).format(Number(amount))}
{formatCurrency(Number(amount))}
</p>
{size === "lg" && <AddTransactionButton />}
</CardContent>
Expand Down

0 comments on commit ec7672f

Please sign in to comment.