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>
40 lines
1001 B
TypeScript
40 lines
1001 B
TypeScript
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>
|
|
);
|
|
}
|