fix: active section badge shows primary background instead of gray
The inline badgeStyle (background: var(--muted)) was overriding the Tailwind activeBadgeClassName (bg-primary) because inline styles have higher specificity. Fixed by not falling back to badgeStyle when activeBadgeClassName is provided and the item is active. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,7 @@ export function NavItem({ icon: Icon, label, count, isActive, activeClassName =
|
||||
const textClass = compact ? 'text-[12px]' : 'text-[13px]'
|
||||
const padding = compact ? '4px 16px' : '6px 16px'
|
||||
const resolvedBadgeClass = isActive && activeBadgeClassName ? activeBadgeClassName : badgeClassName
|
||||
const resolvedBadgeStyle = isActive && activeBadgeStyle ? activeBadgeStyle : badgeStyle
|
||||
const resolvedBadgeStyle = isActive && activeBadgeClassName ? activeBadgeStyle : badgeStyle
|
||||
|
||||
if (disabled) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user