style(ui): change default button size from sm to md and remove explicit size="sm" props
This commit is contained in:
@@ -18,7 +18,7 @@ const AdminHeader = ({ title, description, backHref, backLabel = '← Retour', a
|
|||||||
</div>
|
</div>
|
||||||
<div className='flex gap-2'>
|
<div className='flex gap-2'>
|
||||||
{backHref && (
|
{backHref && (
|
||||||
<Button variant="secondary" size="sm" onClick={() => router.push(backHref)}>
|
<Button variant="secondary" onClick={() => router.push(backHref)}>
|
||||||
{backLabel}
|
{backLabel}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ const RolesPageClient = () => {
|
|||||||
<div className="flex items-center justify-end gap-2">
|
<div className="flex items-center justify-end gap-2">
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="sm"
|
|
||||||
onClick={() => openEdit(role.id)}
|
onClick={() => openEdit(role.id)}
|
||||||
icon={PencilEdit01Icon}
|
icon={PencilEdit01Icon}
|
||||||
>
|
>
|
||||||
@@ -92,7 +91,6 @@ const RolesPageClient = () => {
|
|||||||
{!role.is_system && (
|
{!role.is_system && (
|
||||||
<Button
|
<Button
|
||||||
variant="danger"
|
variant="danger"
|
||||||
size="sm"
|
|
||||||
onClick={() => handleDelete(role)}
|
onClick={() => handleDelete(role)}
|
||||||
icon={Cancel01Icon}
|
icon={Cancel01Icon}
|
||||||
>
|
>
|
||||||
@@ -179,7 +177,7 @@ const RolesPageHeader = () => {
|
|||||||
title="Rôles"
|
title="Rôles"
|
||||||
description="Gérez les rôles et leurs permissions"
|
description="Gérez les rôles et leurs permissions"
|
||||||
action={
|
action={
|
||||||
<Button variant="primary" size="sm" onClick={() => setModalOpen(true)}>
|
<Button variant="primary" onClick={() => setModalOpen(true)}>
|
||||||
Nouveau rôle
|
Nouveau rôle
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ const UsersPageClient = () => {
|
|||||||
render: (user) => (
|
render: (user) => (
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="sm"
|
|
||||||
onClick={() => setEditingUserId(user.id)}
|
onClick={() => setEditingUserId(user.id)}
|
||||||
icon={PencilEdit01Icon}
|
icon={PencilEdit01Icon}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const Button = ({
|
|||||||
onClick,
|
onClick,
|
||||||
type = 'button',
|
type = 'button',
|
||||||
variant = 'primary',
|
variant = 'primary',
|
||||||
size = 'sm',
|
size = 'md',
|
||||||
disabled = false,
|
disabled = false,
|
||||||
loading = false,
|
loading = false,
|
||||||
icon,
|
icon,
|
||||||
@@ -27,23 +27,23 @@ const Button = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const sizes = {
|
const sizes = {
|
||||||
sm: 'px-[12px] py-[6px] text-[12px] gap-1.5',
|
sm: '',
|
||||||
md: 'px-[14px] py-[7px] text-[13px] gap-2',
|
md: 'px-[12px] py-[7px] text-[12px] gap-1.5',
|
||||||
lg: 'px-6 py-3 text-base gap-2.5'
|
lg: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
const iconOnlySizes = {
|
const iconOnlySizes = {
|
||||||
sm: 'p-[6px] text-[12px]',
|
sm: '',
|
||||||
md: 'p-[7px] text-[13px]',
|
md: 'p-[7px] text-[12px]',
|
||||||
lg: 'p-3 text-base'
|
lg: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
const isIconOnly = icon && !children;
|
const isIconOnly = icon && !children;
|
||||||
|
|
||||||
const iconSizes = {
|
const iconSizes = {
|
||||||
sm: 'w-3.5 h-3.5',
|
sm: '',
|
||||||
md: 'w-4 h-4',
|
md: 'w-4 h-4',
|
||||||
lg: 'w-5 h-5'
|
lg: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
const LoadingSpinner = () => (
|
const LoadingSpinner = () => (
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ const Modal = ({
|
|||||||
<div className="flex items-center justify-end gap-2">
|
<div className="flex items-center justify-end gap-2">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
>
|
>
|
||||||
@@ -50,7 +49,6 @@ const Modal = ({
|
|||||||
type="submit"
|
type="submit"
|
||||||
form={FORM_ID}
|
form={FORM_ID}
|
||||||
variant={submitVariant}
|
variant={submitVariant}
|
||||||
size="sm"
|
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={disabled || loading}
|
disabled={disabled || loading}
|
||||||
>
|
>
|
||||||
@@ -90,7 +88,6 @@ const Modal = ({
|
|||||||
{closable && (
|
{closable && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
icon={Cancel01Icon}
|
icon={Cancel01Icon}
|
||||||
className="!p-1 -mr-1"
|
className="!p-1 -mr-1"
|
||||||
|
|||||||
@@ -215,7 +215,6 @@ const Table = ({
|
|||||||
{totalPages > 1 && (
|
{totalPages > 1 && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
|
||||||
onClick={() => onPageChange(currentPage - 1)}
|
onClick={() => onPageChange(currentPage - 1)}
|
||||||
disabled={currentPage === 1}
|
disabled={currentPage === 1}
|
||||||
>
|
>
|
||||||
@@ -240,7 +239,6 @@ const Table = ({
|
|||||||
{totalPages > 1 && (
|
{totalPages > 1 && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
|
||||||
onClick={() => onPageChange(currentPage + 1)}
|
onClick={() => onPageChange(currentPage + 1)}
|
||||||
disabled={currentPage === totalPages}
|
disabled={currentPage === totalPages}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user