feat(admin): standardize Buttons and Modals across CMS, Catalog, Payment, and FAQ managers
This commit is contained in:
1 parent
32f8b8b656
commit
a92cd7fc85
16 files changed
+895
-748
No files matched your search
@@ -42,32 +42,33 @@ export default function Button({
|
||||
const baseClasses =
|
||||
'inline-flex items-center justify-center font-bold whitespace-nowrap transition-all select-none rounded-xl cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-offset-2';
|
||||
|
||||
// Size styling
|
||||
// Size styling - crisp, modern and compact
|
||||
const sizeClasses: Record<ButtonSize, string> = {
|
||||
xs: 'px-2.5 py-1 text-[11px] gap-1.5',
|
||||
sm: 'px-3.5 py-1.5 text-xs gap-2',
|
||||
md: 'px-4 py-2.5 text-xs sm:text-sm gap-2',
|
||||
lg: 'px-6 py-3 text-sm sm:text-base gap-2.5 shadow-md',
|
||||
sm: 'px-3 py-1.5 text-xs gap-1.5',
|
||||
md: 'px-3.5 py-2 text-xs sm:text-sm gap-2',
|
||||
lg: 'px-5 py-2.5 text-sm sm:text-base gap-2 shadow-sm',
|
||||
};
|
||||
|
||||
// Variant styling
|
||||
const variantClasses: Record<ButtonVariant, string> = {
|
||||
primary:
|
||||
'bg-indigo-600 hover:bg-indigo-700 text-white shadow-sm shadow-indigo-200 focus:ring-indigo-500 border border-indigo-600',
|
||||
'bg-purple-600 hover:bg-purple-700 text-white shadow-xs focus:ring-purple-500 border border-purple-600',
|
||||
secondary:
|
||||
'bg-slate-100 hover:bg-slate-200 text-slate-700 focus:ring-slate-400 border border-slate-200',
|
||||
danger:
|
||||
'bg-rose-600 hover:bg-rose-700 text-white shadow-sm shadow-rose-200 focus:ring-rose-500 border border-rose-600',
|
||||
'bg-rose-600 hover:bg-rose-700 text-white shadow-xs focus:ring-rose-500 border border-rose-600',
|
||||
success:
|
||||
'bg-emerald-600 hover:bg-emerald-700 text-white shadow-sm shadow-emerald-200 focus:ring-emerald-500 border border-emerald-600',
|
||||
'bg-emerald-600 hover:bg-emerald-700 text-white shadow-xs focus:ring-emerald-500 border border-emerald-600',
|
||||
warning:
|
||||
'bg-amber-500 hover:bg-amber-600 text-white shadow-sm shadow-amber-200 focus:ring-amber-400 border border-amber-500',
|
||||
'bg-amber-500 hover:bg-amber-600 text-white shadow-xs focus:ring-amber-400 border border-amber-500',
|
||||
outline:
|
||||
'bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 focus:ring-indigo-500',
|
||||
'bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 focus:ring-purple-500',
|
||||
ghost:
|
||||
'bg-transparent hover:bg-gray-100 text-gray-600 focus:ring-gray-300 border border-transparent',
|
||||
};
|
||||
|
||||
|
||||
const iconSizes: Record<ButtonSize, string> = {
|
||||
xs: 'w-3 h-3',
|
||||
sm: 'w-3.5 h-3.5',
|
||||
|
||||
Reference in new issue
Block a user