import React from 'react'; import ListTable from './ListTable'; import Button from './Button'; interface Field { key: string; label: string; } interface Props { title: string; items?: any[]; fields: Field[]; handleRowClick?: (index: number) => void; } const DataTable: React.FC = ({ title, items = [], fields, handleRowClick = () => {} }) => { return ( <>
{title}
{items.length === 0 &&
No data
} ); }; export default DataTable;