change and add into components, widgets and pages

This commit is contained in:
LathanDevers
2026-07-30 14:08:49 +02:00
parent ec900efe3a
commit 057aa628a3
39 changed files with 1620 additions and 1062 deletions
+35
View File
@@ -0,0 +1,35 @@
import React from 'react';
import { Card, CardContent } from '@/components/ui/Card';
interface PageHeaderProps {
title: string;
description: string;
/** Le contenu optionnel à afficher sur la droite (Bouton, Badge, etc.) */
children?: React.ReactNode;
}
export const PageHeader: React.FC<PageHeaderProps> = ({ title, description, children }) => {
return (
<Card className="border-slate-200 shadow-sm">
<CardContent className="p-6 sm:px-8 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
<div>
<h1 className="text-2xl font-bold text-slate-900 tracking-tight">
{title}
</h1>
<p className="text-sm text-slate-500 mt-1">
{description}
</p>
</div>
{/* S'il y a des actions passées en "children", on les affiche ici */}
{children && (
<div className="shrink-0">
{children}
</div>
)}
</CardContent>
</Card>
);
};
export default PageHeader;