How to do IconColumn with reverse boolean?

Usually when I want do do an IconColumn with boolean i just do this

IconColumn::make('is_human_at')
  ->boolean()


However i have a column that need the reverse so I tried to do this

IconColumn::make('is_human_at')
    ->label('is_robot')
    ->icons([
        'heroicon-o-check-circle' => fn (?string $state): bool => $state !== null,
        'heroicon-o-x-circle' => fn (?string $state): bool => $state !== null,
    ])
    ->colors([
        'success' => fn (?string $state): bool => $state !== null,
        'danger' => fn (?string $state): bool => $state !== null,
    ]),


However for the 2nd one, only the danger red shows, when it is supposed to be green it does not show at all
Was this page helpful?