F
Filament16mo ago
Gaspar

How to show FilamentIcon inside Placeholder

This example selects correct "icon class" (instead of icon itself). I would like to show FilamentIcon instead.
Placeholder::make('boolean')
->content(fn (string $state): string => match ($state) {
'1' => 'heroicon-o-check',
default => 'heroicon-x-circle'
}
)
Placeholder::make('boolean')
->content(fn (string $state): string => match ($state) {
'1' => 'heroicon-o-check',
default => 'heroicon-x-circle'
}
)
Could not find example how to do it: https://filamentphp.com/docs/3.x/support/icons
2 Replies
Patrick Boivin
Patrick Boivin16mo ago
One option would be to replace the Placeholder with a custom View and render a <x-filament::icon> in your Blade template
Want results from more Discord servers?
Add your server