feat: enhance card components across the application with consistent hover effects and improved layout; update spacing in categories page for better visual hierarchy
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m5s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m5s
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
CollapsibleContent,
|
||||
CollapsibleTrigger,
|
||||
} from "@/components/ui/collapsible";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { CategoryIcon } from "@/components/ui/category-icon";
|
||||
import {
|
||||
Plus,
|
||||
@@ -54,7 +55,7 @@ export function ParentCategoryRow({
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
return (
|
||||
<div className="border rounded-lg bg-card">
|
||||
<Card className="card-hover">
|
||||
<Collapsible open={isExpanded} onOpenChange={onToggleExpanded}>
|
||||
<div className="flex items-center justify-between px-2 md:px-3 py-1.5 md:py-2">
|
||||
<CollapsibleTrigger asChild>
|
||||
@@ -155,6 +156,6 @@ export function ParentCategoryRow({
|
||||
)}
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ChevronDown, ChevronRight, Plus, Tag } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { CategoryCombobox } from "@/components/ui/category-combobox";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { useIsMobile } from "@/hooks/use-mobile";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { Transaction, Category } from "@/lib/types";
|
||||
@@ -54,7 +55,7 @@ export function RuleGroupCard({
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="border border-border rounded-lg bg-card overflow-hidden">
|
||||
<Card className="card-hover overflow-hidden">
|
||||
{/* Header */}
|
||||
<div
|
||||
className="flex flex-col md:flex-row md:items-center gap-2 md:gap-3 p-3 md:p-4 cursor-pointer hover:bg-accent/5"
|
||||
@@ -247,6 +248,6 @@ export function RuleGroupCard({
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export function BalanceLineChart({
|
||||
};
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle>Évolution du solde</CardTitle>
|
||||
<div className="flex gap-1">
|
||||
|
||||
@@ -73,7 +73,7 @@ export function CategoryBarChart({
|
||||
};
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader>
|
||||
<CardTitle>{title}</CardTitle>
|
||||
</CardHeader>
|
||||
@@ -154,3 +154,5 @@ export function CategoryBarChart({
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
// Find the Card component in this file
|
||||
|
||||
@@ -51,7 +51,7 @@ export function CategoryPieChart({
|
||||
const currentData = isExpanded ? baseData : baseData.slice(0, maxItems);
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader className="flex flex-col md:flex-row md:items-center md:justify-between space-y-2 md:space-y-0 pb-2">
|
||||
<CardTitle className="text-sm md:text-base">{title}</CardTitle>
|
||||
<div className="flex flex-col md:flex-row gap-2 w-full md:w-auto">
|
||||
|
||||
@@ -96,7 +96,7 @@ export function CategoryTrendChart({
|
||||
};
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle>Évolution des dépenses par catégorie</CardTitle>
|
||||
<div className="flex gap-2">
|
||||
|
||||
@@ -28,7 +28,7 @@ export function IncomeExpenseTrendChart({
|
||||
formatCurrency,
|
||||
}: IncomeExpenseTrendChartProps) {
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader>
|
||||
<CardTitle>Tendances revenus et dépenses</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
@@ -127,7 +127,7 @@ export function MonthlyChart({
|
||||
|
||||
if (!collapsible) {
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader>
|
||||
<CardTitle>Revenus vs Dépenses par mois</CardTitle>
|
||||
</CardHeader>
|
||||
@@ -137,7 +137,7 @@ export function MonthlyChart({
|
||||
}
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<Collapsible open={isExpanded} onOpenChange={setIsExpanded}>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 py-3 px-6">
|
||||
<CardTitle className="text-base font-semibold">
|
||||
|
||||
@@ -31,7 +31,7 @@ export function SavingsTrendChart({
|
||||
const isPositive = latestSavings >= 0;
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle>Évolution des économies</CardTitle>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -21,7 +21,7 @@ export function TopExpensesList({
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-sm md:text-base">Top 5 dépenses</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
@@ -33,7 +33,7 @@ export function YearOverYearChart({
|
||||
previousYearLabel = "Année précédente",
|
||||
}: YearOverYearChartProps) {
|
||||
return (
|
||||
<Card>
|
||||
<Card className="card-hover">
|
||||
<CardHeader>
|
||||
<CardTitle>Comparaison année sur année</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
Reference in New Issue
Block a user