TextColumn Dynamic Color

In table we can change column color with

TextColumn::make('status')
    ->color('primary')


How can we change the color dynamically, for example if status is shipped then, it's success, if status is cancelled then it's danger.
Was this page helpful?