Skip to content

Commit

Permalink
fix: error isActive
Browse files Browse the repository at this point in the history
  • Loading branch information
Noval Oktavio committed Dec 1, 2021
1 parent 58dc765 commit f749242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/VMenu/VMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const isActive = (path: any) => {
<DisclosureButton
v-slot="{open}"
class="focus:outline-none w-full transition duration-300 rounded group"
:class="[isActive(child) ? 'text-primary-600' : textColor]"
:class="[isActive(menu) ? 'text-primary-600' : textColor]"
>
<div
class="py-3 w-full flex items-center px-2 gap-x-2 rounded"
Expand Down Expand Up @@ -151,7 +151,7 @@ const isActive = (path: any) => {
:to="menu.to"
exact
class="group menu-item transition duration-300 w-full px-2 py-3 rounded flex gap-x-2 items-center text-sm mb-1 relative"
:class="[mini ? 'justify-start sm:justify-center' : '']"
:class="[isActive(menu) ? 'text-primary-600' : textColor, mini ? 'justify-start sm:justify-center' : '']"
>
<img v-if="menu.img" :src="menu.img" alt="img icon" class="w-5 h-5" />
<component :is="menu.icon" v-else-if="menu.icon" class="w-5 h-5" />
Expand Down

0 comments on commit f749242

Please sign in to comment.