Placeholder::make('Status')->content(function ($record){
$color = match ($record->status) {
'pending' => 'gray',
'delivered' => 'yellow',
'completed' => 'green',
};
$string = '<span class="inline-flex items-center gap-x-1.5 rounded-md bg-'.$color.'-100 px-2 py-1 text-xs font-medium text-'.$color.'-600">
<svg class="h-1.5 w-1.5 fill-'.$color.'-400" viewBox="0 0 6 6" aria-hidden="true"><circle cx="3" cy="3" r="3" />
</svg>'.$record->status.'</span>';
return new HtmlString($string);
})
Placeholder::make('Status')->content(function ($record){
$color = match ($record->status) {
'pending' => 'gray',
'delivered' => 'yellow',
'completed' => 'green',
};
$string = '<span class="inline-flex items-center gap-x-1.5 rounded-md bg-'.$color.'-100 px-2 py-1 text-xs font-medium text-'.$color.'-600">
<svg class="h-1.5 w-1.5 fill-'.$color.'-400" viewBox="0 0 6 6" aria-hidden="true"><circle cx="3" cy="3" r="3" />
</svg>'.$record->status.'</span>';
return new HtmlString($string);
})