Change the color of Material UI datagrid components

Viewed 1122

How can I change the color of all the components of the Material UI Datagrid? I've tried using styling prop but it only changes the color of the header and row contents.

<DataGrid
   sx={{fontFamily:"Plus Jakarta Sans, sans-serif", color:'#EEF1F6',}}
   getRowId={(row) => row.id}
   rows={rows}
   columns={columns}
   checkboxSelection 
   disableSelectionOnClick
   onSelectionModelChange={(id) => {
   setidSelect(id);
   console.log(id);}}/>

But I need to change the font color of the footer contents and checkboxes.

1 Answers

check this url https://mui.com/x/react-data-grid/style/

<DataGrid
  {...data}
  sx={{
    boxShadow: 2,
    border: 2,
    borderColor: 'primary.light',
    '& .MuiDataGrid-cell:hover': {
      color: 'primary.main',
    },
  }}
/>
Related