fix badge color for admin
This commit is contained in:
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user