diff --git a/front/src/components/library/AlbumDropdown.vue b/front/src/components/library/AlbumDropdown.vue index f8fa1f7c0..75b48db87 100644 --- a/front/src/components/library/AlbumDropdown.vue +++ b/front/src/components/library/AlbumDropdown.vue @@ -92,59 +92,62 @@ const open = ref(false) diff --git a/front/src/components/ui/popover/PopoverItem.vue b/front/src/components/ui/popover/PopoverItem.vue index f6aa9b3c3..8eb8c453f 100644 --- a/front/src/components/ui/popover/PopoverItem.vue +++ b/front/src/components/ui/popover/PopoverItem.vue @@ -10,6 +10,7 @@ const emit = defineEmits<{'internal:id': [value: number]}>() const { parentPopoverContext, to } = defineProps<{ parentPopoverContext?: PopoverContext; to?:RouterLinkProps['to']; + icon?: string; }>() const { items, hoveredItem } = parentPopoverContext ?? inject(POPOVER_CONTEXT_INJECTION_KEY, { items: ref(0), @@ -26,6 +27,7 @@ emit('internal:id', id) class="popover-item" target="_blank" > +
@@ -34,6 +36,7 @@ emit('internal:id', id) @@ -49,6 +52,7 @@ emit('internal:id', id) textAlign: left; gap: 8px; " + :icon="icon" @mouseover="hoveredItem = id" class="popover-item" > diff --git a/front/ui-docs/components/ui/popover.md b/front/ui-docs/components/ui/popover.md index 1bc0614b1..c6266d98e 100644 --- a/front/ui-docs/components/ui/popover.md +++ b/front/ui-docs/components/ui/popover.md @@ -359,6 +359,37 @@ const open = ref(false) +### Icon Prop + +PopoverItem supports an `icon` prop to easily add icons to menu items. The icon prop accepts standard Bootstrap icon classes. + +| Prop | Data type | Required? | Description | +|--------|-----------|-----------|------------------------------------------------| +| `icon` | String | No | Bootstrap icon class to display before the item | + +```vue-html + + Play next + + + + Share + +``` + + + + + +``` + ## Submenus To create more complex menus, you can use submenus (`PopoverSubmenu`). Submenus are menu items which contain other menu items.