refactor: extract Icons and InlineFormActions UI components
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m28s

- Add Icons.tsx: IconEdit, IconTrash, IconDuplicate, IconPlus, IconCheck, IconClose
- Add InlineFormActions.tsx: unified Annuler/Ajouter-Enregistrer button pair
- Replace inline SVGs in SwotCard, YearReviewCard, WeeklyCheckInCard, SwotQuadrant,
  YearReviewSection, WeeklyCheckInSection, EditableTitle, Modal, GifMoodCard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 14:25:35 +01:00
parent 09a849279b
commit 9a43980412
12 changed files with 150 additions and 245 deletions

View File

@@ -0,0 +1,39 @@
interface InlineFormActionsProps {
onCancel: () => void;
onSubmit: () => void;
isPending: boolean;
disabled?: boolean;
submitLabel?: string;
submitColorClass?: string;
className?: string;
}
export function InlineFormActions({
onCancel,
onSubmit,
isPending,
disabled = false,
submitLabel = 'Ajouter',
submitColorClass = 'text-primary hover:bg-primary/10',
className = '',
}: InlineFormActionsProps) {
return (
<div className={`flex justify-end gap-1 ${className}`}>
<button
onClick={onCancel}
className="rounded px-2 py-1 text-xs text-muted hover:bg-card-hover"
disabled={isPending}
>
Annuler
</button>
<button
onMouseDown={(e) => e.preventDefault()}
onClick={onSubmit}
disabled={isPending || disabled}
className={`rounded px-2 py-1 text-xs font-medium disabled:opacity-50 ${submitColorClass}`}
>
{isPending ? '...' : submitLabel}
</button>
</div>
);
}