import clsx from 'clsx'; import { Children, PropsWithChildren } from 'react'; type Props = { headers?: string[]; dataCy?: string; className?: string; emptyMessage?: string; }; export function DetailsTable({ headers = [], dataCy, className, emptyMessage, children, }: PropsWithChildren) { return ( {headers.length > 0 && ( {headers.map((header) => ( ))} )} {Children.count(children) > 0 ? ( children ) : ( )}
{header}
{emptyMessage}
); }