diff --git a/docs/MODULES.md b/docs/MODULES.md index ea23369..f5a6ec3 100644 --- a/docs/MODULES.md +++ b/docs/MODULES.md @@ -168,6 +168,49 @@ registerPage({ slug: 'blog', Component: BlogAdminPage, title: 'Blog' }); Rendue sous `/admin/blog`. +Pour l'en-tête des pages admin (titre, description, bouton retour, action), utiliser `AdminHeader` importé depuis `@zen/core/features/admin/components` : + +```js +'use client'; +import { AdminHeader } from '@zen/core/features/admin/components'; + +// Page liste avec bouton d'action +export default function BlogListPage() { + return ( +
+ Créer un billet} + /> + {/* ... */} +
+ ); +} + +// Page formulaire avec bouton retour +export default function BlogCreatePage() { + return ( +
+ + {/* ... */} +
+ ); +} +``` + +| Prop | Type | Description | +|------|------|-------------| +| `title` | `string` | Titre de la page. | +| `description` | `string` | Sous-titre optionnel. | +| `backHref` | `string` | Si fourni, affiche un bouton « ← Retour » qui navigue vers cette URL. | +| `backLabel` | `string` | Label du bouton retour (défaut : `← Retour`). | +| `action` | `ReactNode` | Élément affiché à droite (bouton créer, etc.). | + ### Widgets dashboard ```js @@ -312,7 +355,7 @@ Sous-entrées explicitement safe pour un import depuis un fichier `'use client'` |-------------|---------| | `@zen/core/users/constants` | `PERMISSIONS`, `PERMISSION_DEFINITIONS`, `getPermissionGroups` — aucun import serveur. | | `@zen/core/features/admin` | `registerPage`, `registerWidget`, `registerNavItem`, `registerNavSection`, `buildNavigationSections`. Neutre côté boundary. | -| `@zen/core/features/admin/components` | Composants client. | +| `@zen/core/features/admin/components` | Composants client : `AdminHeader`, `AdminShell`, `AdminSidebar`, `ThemeToggle`, modals. | | `@zen/core/themes` | Tokens/utilitaires de thème. | | `@zen/core/toast` | API toast côté client. | | `@zen/core/shared/icons` | Composants d'icônes. |