Closed krzysztofrewak closed 3 years ago
Hey @krzysztofrewak the following works for me by using the default component that you mentioned. Are you sure that doesn't works for you?
<x-icon name="heroicon-o-cog" class="w-25 h-25" />
<x-icon :name="'heroicon-o-' . $icon" class="w-25 h-25" />
Are you sure that doesn't works for you?
@driesvints, sadly I'm receiving InvalidArgumentException
with Unable to locate a class or view for component [icon].
message. But probably then I should somehow register base Icon
component?
It should be available out of the box with the new blade icons release. Are you running Blade Icons v1?
And it's solved, thank you. :)
I started new project two weeks ago and I didn't check that 0.3.1
is not newest version available. Sorry for a problem.
Background
The basic form of using the component is super convenient:
But I found a problem with more complex usage. I was trying to create section wrapper component, something like this:
And it can be used as:
I think that putting a named slot for rendering an optional icon is an overkill. I wanted to achieve something like this:
Stupid-simple solution is not working:
More complex one, is working, but it's ugly as hell:
Proposed new feature
It would be extremely convenient to have an option to use some variable to define icons. Something like this:
I saw that here's an option for "default component" in parent package: https://github.com/blade-ui-kit/blade-icons#default-component but I cannot reuse it with Heroicons.