Skip to content

Commit 1e2fe17

Browse files
authored
fix: uses data-active state as reka-ui applies it on NavigationMenuLink (#1592)
reka-ui sets `data-active` attribute depending on condition. previous implementation used css class that checked for data-[active=true] which was never a match
1 parent 3af5e1f commit 1e2fe17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/v4/registry/new-york-v4/ui/navigation-menu/NavigationMenuLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
1919
<NavigationMenuLink
2020
data-slot="navigation-menu-link"
2121
v-bind="forwarded"
22-
:class="cn('data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 [&_svg:not([class*=\'text-\'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
22+
:class="cn('data-active:focus:bg-accent data-active:hover:bg-accent data-active:bg-accent/50 data-active:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 [&_svg:not([class*=\'text-\'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
2323
>
2424
<slot />
2525
</NavigationMenuLink>

0 commit comments

Comments
 (0)