1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00
portainer/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/columns/name.tsx
James Player f6f07f4690 improvement(kubernetes): right align tags in datatables R8S-250 (#601)
Co-authored-by: testA113 <aliharriss1995@gmail.com>
2025-04-03 14:18:31 +13:00

27 lines
612 B
TypeScript

import { CellContext } from '@tanstack/react-table';
import { Badge } from '@@/Badge';
import type { IngressControllerClassMap } from '../../types';
import { columnHelper } from './helper';
export const name = columnHelper.accessor('ClassName', {
header: 'Ingress class',
cell: NameCell,
id: 'name',
});
function NameCell({
row,
getValue,
}: CellContext<IngressControllerClassMap, string>) {
const className = getValue();
return (
<span className="flex gap-2 flex-nowrap">
{className}
{row.original.New && <Badge className="ml-auto">Newly detected</Badge>}
</span>
);
}