Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the possibility to customize the icon per widget. #34

Closed
wants to merge 8 commits into from

Conversation

bmspereira-07
Copy link
Contributor

Changed the widget getData function to check if the resource received is an array containing the keys "icon" and "resource". If so it will output the passed values otherwise it will read from the resource class as before.

@awcodes
Copy link
Owner

awcodes commented Feb 10, 2024

Thanks for the PR.

I think I would prefer to do this with a mapping strategy and a new modifier. Something like this, maybe.

->icons([
    'heroicon-o-photo' => App\Filament\Resources\MediaResource::class
])

@bmspereira-07
Copy link
Contributor Author

Thanks for the PR.

I think I would prefer to do this with a mapping strategy and a new modifier. Something like this, maybe.

->icons([
    'heroicon-o-photo' => App\Filament\Resources\MediaResource::class
])

Thanks for the reply!
Yeah I can see your approach to it. I'm gonna try to fiddle with it a bit more since it's my first time adventuring in this world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants