vannut/statamic-weather-addon

Icon in navigation

Closed this issue · 1 comments

The icon in the navigation is not working.
Which icons can be used? Reference?

You can either choose one of statamics pre-installed icons by name from vendor/statamic/cms/resources/svg or pass a custom svg to the icon function as specified in the docs

Pre-Installed:

Nav::extend(function ($nav) {

    $nav->create('Store')
        ->section('Jack & Sons Inc.')
        ->route('store.index')
        ->icon('shopping-cart');
});

Custom:

Nav::extend(function ($nav) {

    $nav->create('Store')
        ->section('Jack & Sons Inc.')
        ->route('store.index')
        ->icon('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.547 9.674l7.778 7.778a4.363 4.363 0 0 0 .9-4.435l5.965-5.964.177.176a1.25 1.25 0 0 0 1.768-1.767l-4.6-4.6a1.25 1.25 0 0 0-1.765 1.771l.177.177-5.965 5.965a4.366 4.366 0 0 0-4.435.899zM10.436 13.563L.5 23.499" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>');
});