Skip to content

Commit 752bf70

Browse files
committed
refactor: update badge rendering in MenuLink component to improve tooltip display
1 parent f382eb5 commit 752bf70

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

adminforth/spa/src/components/MenuLink.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
>
1313
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons dark:text-darkSidebarIcons transition duration-75 group-hover:text-lightSidebarIconsHover dark:group-hover:text-darkSidebarIconsHover" ></component>
1414
<span class="text-ellipsis overflow-hidden ms-3">{{ item.label }}</span>
15-
<span v-if="item.badge" class="inline-flex items-center justify-center h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
16-
fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]"
15+
<span v-if="item.badge"
1716
>
1817

1918
<Tooltip v-if="item.badgeTooltip">
20-
{{ item.badge }}
19+
<div class="inline-flex items-center justify-center h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
20+
fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]">{{ item.badge }}</div>
2121

2222
<template #tooltip>
2323
{{ item.badgeTooltip }}
2424
</template>
2525
</Tooltip>
2626
<template v-else>
27-
{{ item.badge }}
27+
<div class="inline-flex items-center justify-center h-3 py-3 px-1 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
28+
fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent min-w-[1.5rem] max-w-[3rem]">{{ item.badge }}</div>
2829
</template>
2930

3031
</span>

0 commit comments

Comments
 (0)