"use client"; import { FC } from "react"; import { Grid, Box } from "@mui/material"; import { DataGridPro, GridColDef } from "@mui/x-data-grid-pro"; import { typography, colors } from "../styles/theme"; interface ListProps { title: string; rows: any; columns: GridColDef[]; onRowClick?: (id: string) => void; getRowID?: (row: any) => any; buttons?: React.ReactNode; paginate?: boolean; } export const List: FC = ({ title, rows, columns, onRowClick, getRowID, buttons, paginate = false, }) => { const { h3 } = typography; const { mediumGray, lightGray, veryLightGray, mediumBlue, white, darkGray } = colors; const getRowIDInternal = (row: any) => { if (getRowID) { return getRowID(row); } return row.id; }; return ( {title} {buttons} onRowClick?.(getRowIDInternal(row))} /> ); };