Skip to content

Commit 8076aa5

Browse files
committed
Update docs
1 parent e4b38f6 commit 8076aa5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,13 @@ StateFusionSelectColumn::make('status')
268268
```
269269

270270
#### TextColumn
271-
You can also use the standard `TextColumn` to display the state as a badge. If your state classes implement `HasColor` and `HasIcon`, the badge will automatically reflect the state's color, and you can display an icon.
271+
You can also use the standard `TextColumn` to display the state as a badge. When your state classes implement `HasLabel`, `HasColor`, and `HasIcon` interfaces, the badge will automatically display the appropriate label, color, and icon without any additional configuration.
272272

273273
```php
274274
use Filament\Tables\Columns\TextColumn;
275275

276276
TextColumn::make('status')
277-
->badge()
278-
->icon(fn ($record) => $record->status->getIcon());
277+
->badge(),
279278
```
280279

281280
### Table Filter
@@ -315,14 +314,13 @@ StateFusionBulkAction::make('approve')
315314
### Infolist Entries
316315

317316
#### TextEntry
318-
Similar to the table column, you can use the standard `TextEntry` in your infolists to display the model state as a badge with an icon and color.
317+
Similar to the table column, you can use the standard `TextEntry` in your infolists to display the model state as a badge. When your state classes implement `HasLabel`, `HasColor`, and `HasIcon` interfaces, the badge will automatically display the appropriate label, color, and icon without any additional configuration.
319318

320319
```php
321320
use Filament\Infolists\Components\TextEntry;
322321

323322
TextEntry::make('status')
324-
->badge()
325-
->icon(fn ($record) => $record->status->getIcon());
323+
->badge(),
326324
```
327325

328326
### Page Actions

0 commit comments

Comments
 (0)