fix: standardize formatting and improve readability across various components and styles, including CSS and TypeScript files
This commit is contained in:
@@ -16,38 +16,31 @@ export function AccountBulkActions({
|
||||
onDelete,
|
||||
}: AccountBulkActionsProps) {
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
|
||||
if (selectedCount === 0) return null;
|
||||
|
||||
return (
|
||||
<Card className="bg-destructive/5 border-destructive/20 sticky top-0 z-10 mb-4">
|
||||
<CardContent className={cn(
|
||||
"py-3",
|
||||
isMobile && "px-3"
|
||||
)}>
|
||||
<div className={cn(
|
||||
"flex items-center gap-2 sm:gap-4",
|
||||
isMobile && "flex-col sm:flex-row"
|
||||
)}>
|
||||
<span className={cn(
|
||||
"font-medium",
|
||||
isMobile ? "text-xs" : "text-sm"
|
||||
)}>
|
||||
<CardContent className={cn("py-3", isMobile && "px-3")}>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center gap-2 sm:gap-4",
|
||||
isMobile && "flex-col sm:flex-row",
|
||||
)}
|
||||
>
|
||||
<span className={cn("font-medium", isMobile ? "text-xs" : "text-sm")}>
|
||||
{selectedCount} compte{selectedCount > 1 ? "s" : ""} sélectionné
|
||||
{selectedCount > 1 ? "s" : ""}
|
||||
</span>
|
||||
<Button
|
||||
size={isMobile ? "sm" : "sm"}
|
||||
variant="destructive"
|
||||
<Button
|
||||
size={isMobile ? "sm" : "sm"}
|
||||
variant="destructive"
|
||||
onClick={onDelete}
|
||||
className={cn(
|
||||
isMobile && "w-full sm:w-auto"
|
||||
)}
|
||||
className={cn(isMobile && "w-full sm:w-auto")}
|
||||
>
|
||||
<Trash2 className={cn(
|
||||
isMobile ? "w-3.5 h-3.5" : "w-4 h-4",
|
||||
"mr-1"
|
||||
)} />
|
||||
<Trash2
|
||||
className={cn(isMobile ? "w-3.5 h-3.5" : "w-4 h-4", "mr-1")}
|
||||
/>
|
||||
Supprimer
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -82,7 +82,7 @@ export function AccountCard({
|
||||
"relative group",
|
||||
isSelected && "ring-2 ring-primary shadow-lg shadow-primary/10",
|
||||
isDragging && "bg-muted/80 opacity-60",
|
||||
"hover:scale-[1.02] transition-transform duration-200"
|
||||
"hover:scale-[1.02] transition-transform duration-200",
|
||||
)}
|
||||
>
|
||||
<CardHeader className={cn("pb-0", isMobile && "px-2 pt-2")}>
|
||||
@@ -111,7 +111,7 @@ export function AccountCard({
|
||||
<div
|
||||
className={cn(
|
||||
"rounded-full bg-primary/10 flex items-center justify-center shrink-0",
|
||||
isMobile ? "w-6 h-6" : "w-8 h-8"
|
||||
isMobile ? "w-6 h-6" : "w-8 h-8",
|
||||
)}
|
||||
>
|
||||
<Icon
|
||||
@@ -122,7 +122,7 @@ export function AccountCard({
|
||||
<CardTitle
|
||||
className={cn(
|
||||
"font-semibold truncate leading-tight",
|
||||
isMobile ? "text-[11px]" : "text-sm"
|
||||
isMobile ? "text-[11px]" : "text-sm",
|
||||
)}
|
||||
>
|
||||
{account.name}
|
||||
@@ -184,7 +184,7 @@ export function AccountCard({
|
||||
? "text-base"
|
||||
: "text-xl",
|
||||
!compact && !isMobile && "mb-1.5",
|
||||
realBalance >= 0 ? "text-emerald-600" : "text-red-600"
|
||||
realBalance >= 0 ? "text-emerald-600" : "text-red-600",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(realBalance)}
|
||||
@@ -194,7 +194,7 @@ export function AccountCard({
|
||||
href={`/transactions?accountId=${account.id}`}
|
||||
className={cn(
|
||||
"text-muted-foreground hover:text-primary hover:underline shrink-0 whitespace-nowrap",
|
||||
isMobile ? "text-[9px]" : "text-xs"
|
||||
isMobile ? "text-[9px]" : "text-xs",
|
||||
)}
|
||||
>
|
||||
{transactionCount} txns
|
||||
@@ -207,7 +207,7 @@ export function AccountCard({
|
||||
className={cn(
|
||||
"flex items-center justify-between gap-2 mt-1",
|
||||
isMobile ? "text-[10px]" : "text-xs",
|
||||
"text-muted-foreground"
|
||||
"text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user