fix badge color for admin

This commit is contained in:
2026-01-11 21:19:02 +00:00
parent 03e413aeca
commit 2b13426c8c

View File

@ -25,16 +25,22 @@ const Badge: React.FC<IBadge> = ({ title, slug, color }) => {
return (
<span
data-testid='badge'
className={clsx('inline-flex items-center rounded px-2 py-0.5 text-xs font-medium', color ? {
'bg-gray-100 text-gray-100': isDark,
'bg-gray-800 text-gray-900': !isDark,
} : {
'bg-fuchsia-700 text-white': slug === 'patron',
'bg-black text-white': slug === 'admin',
'bg-cyan-600 text-white': slug === 'moderator',
'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100': fallback,
'bg-white/75 text-gray-900': slug === 'opaque',
})}
className={clsx(
'inline-flex items-center rounded px-2 py-0.5 text-xs font-medium',
color
? {
'bg-gray-100 text-gray-100': isDark,
'bg-gray-800 text-gray-900': !isDark,
}
: {
'bg-fuchsia-700 text-white': slug === 'patron',
'bg-orange-700 text-white': slug === 'admin',
'bg-cyan-600 text-white': slug === 'moderator',
'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100':
fallback,
'bg-white/75 text-gray-900': slug === 'opaque',
},
)}
style={color ? { background: color } : undefined}
>
{title}