import React, { memo } from 'react' type CellHeaderProps = { title?: string setVisible(x: any): void visible?: boolean totalIssues?: number small?: boolean singleRow?: boolean // display in a single row } const ListCellHeaderW = ({ title = 'N/A', setVisible, visible, totalIssues, small, singleRow, }: CellHeaderProps) => { const onTogglelist = () => setVisible((v: boolean) => !v) // return a small single row of the page and issues with a dropdown if (singleRow) { return ( {title} {totalIssues} ) } return ( {title} {totalIssues} possible issue {totalIssues === 1 ? '' : 's'} ) } export const ListCellHeader = memo(ListCellHeaderW)