@@ -8,6 +8,7 @@ import { GridColDef, DataGrid } from '@mui/x-data-grid';
88import { GridToolbar } from '@mui/x-data-grid/components' ;
99import * as DashboardContext from '../context/DashboardContext' ;
1010import lightAndDark from './Styling' ;
11+ import Box from '@mui/material/Box' ;
1112
1213import { Button , TextField } from '@mui/material' ;
1314
@@ -38,6 +39,7 @@ const TransferColumns = React.memo(() => {
3839
3940 const currentMode = mode === 'light' ? lightAndDark . lightModeText : lightAndDark . darkModeText ;
4041 const currentStyle = mode === 'light' ? lightAndDark . lightModeData : lightAndDark . darkModeData ;
42+ const buttonStyle = mode === 'light' ? lightAndDark . lightModeButtons : lightAndDark . darkModeButtons ;
4143
4244 useEffect ( ( ) => {
4345 if ( healthData ) {
@@ -159,20 +161,20 @@ const TransferColumns = React.memo(() => {
159161
160162 // makes the column titles for the selection grid
161163 const columns : GridColDef [ ] = [
162- { field : 'id' , headerName : 'ID' , flex : 1 , headerClassName : 'style ' , } ,
164+ { field : 'id' , headerName : 'ID' , flex : 1 , headerClassName : 'grid-header ' , } ,
163165 {
164166 field : 'tag' ,
165167 headerName : 'Category' ,
166168 flex : 1 ,
167169 editable : true ,
168- headerClassName : 'style ' ,
170+ headerClassName : 'grid-header ' ,
169171 } ,
170172 {
171173 field : 'title' ,
172174 headerName : 'Metric' ,
173175 flex : 3 ,
174176 editable : true ,
175- headerClassName : 'style ' ,
177+ headerClassName : 'grid-header ' ,
176178 } ,
177179 ] ;
178180
@@ -220,8 +222,32 @@ const TransferColumns = React.memo(() => {
220222 </ Button >
221223 </ div >
222224 < div id = "transferTest" >
223- < div style = { { height : '500px' , width : '100%' } } >
224-
225+
226+ < Box
227+ sx = { {
228+ height : '500px' ,
229+ width : '100%' ,
230+ '& .grid-header' : {
231+ backgroundColor : currentStyle . backgroundColor ,
232+ color : currentStyle . color ,
233+ } ,
234+ '& .MuiDataGrid-root .MuiDataGrid-cell' : {
235+ color : currentStyle . color ,
236+ } ,
237+ '& .MuiInputBase-input' : {
238+ color : currentStyle . color , // Change text color of the search input
239+ } ,
240+ '& .MuiSvgIcon-root' : {
241+ backgroundColor : '#E3E3F0' , // Change color of the search icon
242+ } ,
243+ '& .MuiDataGrid-columnHeaderTitleContainer' : {
244+ backgroundColor : currentStyle . backgroundColor ,
245+ } ,
246+ '& .MuiTablePagination-displayedRows' : {
247+ color : currentStyle . color ,
248+ } ,
249+ } }
250+ >
225251 < DataGrid
226252 // style={currentStyle }
227253 rows = { rows }
@@ -231,6 +257,8 @@ const TransferColumns = React.memo(() => {
231257 slotProps = { {
232258 toolbar : {
233259 showQuickFilter : true ,
260+
261+
234262 } ,
235263 } }
236264 pageSizeOptions = { [ 10 ] }
@@ -246,6 +274,7 @@ const TransferColumns = React.memo(() => {
246274 } }
247275
248276 />
277+ </ Box >
249278
250279 </ div >
251280 { selectedRows . length > 0 && (
@@ -263,7 +292,6 @@ const TransferColumns = React.memo(() => {
263292 >
264293 { selectedRows }
265294 </ ol >
266- </ div >
267295 </ >
268296 ) ;
269297} ) ;
0 commit comments