import type { ICellRendererParams } from '@ag-grid-community/core'; import clsx from 'clsx'; import { Link } from 'react-router-dom'; import styles from './generic-cell.module.css'; import { Skeleton } from '/@/shared/components/skeleton/skeleton'; import { Text } from '/@/shared/components/text/text'; type Options = { array?: boolean; isArray?: boolean; isLink?: boolean; position?: 'center' | 'left' | 'right'; primary?: boolean; }; export const GenericCell = ({ value, valueFormatted }: ICellRendererParams, options?: Options) => { const { isLink, position, primary } = options || {}; const displayedValue = valueFormatted || value; if (value === undefined) { return ( ); } return ( {isLink ? ( {isLink ? displayedValue.value : displayedValue} ) : ( {displayedValue} )} ); }; export const CellContainer = ({ children, position, }: { children: React.ReactNode; position: 'center' | 'left' | 'right'; }) => { return (
{children}
); };