diff --git a/src/components/MockDataGrid.tsx b/src/components/MockDataGrid.tsx index b2d4c15..9a1af67 100644 --- a/src/components/MockDataGrid.tsx +++ b/src/components/MockDataGrid.tsx @@ -6,6 +6,8 @@ type MockDataGridProps = DataGridProps & { export function MockDataGrid({ "data-testid": testId, + sx, + getRowHeight, ...props }: MockDataGridProps) { return ( @@ -19,11 +21,34 @@ export function MockDataGrid({ pagination: { paginationModel: { pageSize: 10, page: 0 } }, }} getRowId={(row) => row.id as string} - sx={{ - border: 1, - borderColor: "divider", - backgroundColor: "background.paper", - }} + getRowHeight={getRowHeight ?? (() => "auto")} + sx={[ + { + border: 1, + borderColor: "divider", + backgroundColor: "background.paper", + "& .MuiDataGrid-columnHeaderTitle": { + fontWeight: 700, + }, + "& .MuiDataGrid-cell": { + borderBottom: "1px solid", + borderColor: "divider", + py: 1, + alignItems: "flex-start", + display: "flex", + }, + "& .MuiDataGrid-cellContent": { + whiteSpace: "normal", + wordBreak: "break-word", + lineHeight: 1.35, + width: "100%", + }, + "& .MuiDataGrid-row:last-of-type .MuiDataGrid-cell": { + borderBottom: "none", + }, + }, + ...(Array.isArray(sx) ? sx : sx ? [sx] : []), + ]} {...props} />