refactor(admin): move back button and action to a flex container on the right side of AdminHeader
This commit is contained in:
@@ -9,11 +9,6 @@ const AdminHeader = ({ title, description, backHref, backLabel = '← Retour', a
|
||||
return (
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
{backHref && (
|
||||
<Button variant="secondary" size="sm" onClick={() => router.push(backHref)}>
|
||||
{backLabel}
|
||||
</Button>
|
||||
)}
|
||||
<div>
|
||||
<h1 className="text-lg sm:text-xl font-semibold text-neutral-900 dark:text-white">{title}</h1>
|
||||
{description && (
|
||||
@@ -21,7 +16,14 @@ const AdminHeader = ({ title, description, backHref, backLabel = '← Retour', a
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{action}
|
||||
<div className='flex gap-2'>
|
||||
{backHref && (
|
||||
<Button variant="secondary" size="sm" onClick={() => router.push(backHref)}>
|
||||
{backLabel}
|
||||
</Button>
|
||||
)}
|
||||
{action}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user