nova-menu icon indicating copy to clipboard operation
nova-menu copied to clipboard

Icons appearing above the menu items in the user menu

Open peoplebankDev opened this issue 1 year ago • 3 comments

I'm using the MenuDisclosure to create a custom user menu where the application settings will be held. But the icons are appearing above the menu items and not inline like in your example project. I also tried installing the Font Awesome icons but the command you gave does not appear to do anything.

Here is my code, the font awsome icon does not appear and hero icons are above the menu item. Am I missing something here?

` Nova::userMenu(function (Request $request, Menu $menu) {

            $menu->prepend(
                NovaMenuItem::make(
                    'My Profile',
                    "/resources/users/{$request->user()->getKey()}"
                )
            );

            $menu->prepend(
                NovaMenuDisclosure::make('Settings', [
                    NovaMenuItem::make('General Settings', '/settings'),
                    NovaMenuItem::make('Nova Settings', '/nova-settings'),
                ])->icon('cog')
            );

            $menu->prepend(
                NovaMenuDisclosure::make('Company Structure', [
                    NovaMenuItem::resource(Organisation::class)
                    NovaMenuItem::resource(Country::class),
                ])->faIcon('fa-solid fa-house')
            );

            $menu->prepend(
                NovaMenuDisclosure::make('Statuses', [
                    NovaMenuItem::resource(Status::class),
                  
                ])->icon('clipboard-list')
            );

            return $menu;
        });`

peoplebankDev avatar Mar 19 '25 20:03 peoplebankDev

following.

recci avatar Mar 19 '25 21:03 recci

it appears flex items-center gap-1 is missing from the div surrounding the icon. I was able to do this to fix the issue

NovaMenuDisclosure::make('Settings', [ NovaMenuItem::make('Application Settings', 'settings'), ])->icon('cog')->iconClasses(['inline-block']),

However, adding icons to the menu items in the user menu doesn't work, and i cant get font awsome icons to work

recci avatar Mar 19 '25 22:03 recci

User Menu is no longer supported?

Muetze42 avatar Mar 21 '25 08:03 Muetze42