Icon::make() error #233
-
I try to use the
Usage: public static function table(Table $table): Table
{
return $table
->columns([
Columns\Icon::make('status')
->options([
'accepted' => 'heroicon-s-check-circle',
'declined' => 'heroicon-x-circle',
'pending' => 'heroicon-s-clock',
]),
]);
} Can you please advise? |
Beta Was this translation helpful? Give feedback.
Answered by
ryangjchandler
Mar 16, 2021
Replies: 1 comment 1 reply
-
The documentation is actually wrong, I'll try and sort this out tomorrow. The keys in the array should be the name of the icons and the values should be callback functions that return a boolean. If the callback returns true, that icon (key) will be used. The callback function receives the value of the column, pulled from the record. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
devemio
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation is actually wrong, I'll try and sort this out tomorrow.
The keys in the array should be the name of the icons and the values should be callback functions that return a boolean.
If the callback returns true, that icon (key) will be used.
The callback function receives the value of the column, pulled from the record.