Skip to content

Commit

Permalink
1) Alternate the background color of rows to enhance readability. #2874
Browse files Browse the repository at this point in the history
2) Make the background color for the serial number and header cells distinct. #7863
  • Loading branch information
RohitBhati8269 authored Oct 1, 2024
1 parent 15c37b6 commit f8fb78b
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const StyledPgReactDataGrid = styled(PgReactDataGrid)(({theme})=>({
'& .QueryTool-columnName': {
fontWeight: 'bold',
},
backgroundColor: theme.palette.grey[600],
},
'& .QueryTool-editedCell': {
fontWeight: 'bold',
Expand All @@ -53,6 +54,8 @@ const StyledPgReactDataGrid = styled(PgReactDataGrid)(({theme})=>({
},
'& .QueryTool-rowNumCell': {
padding: '0px 8px',
fontWeight: 900,
color: theme.otherVars.tree.textFg,
},
'& .QueryTool-colHeaderSelected': {
outlineColor: theme.palette.primary.main,
Expand All @@ -63,7 +66,24 @@ const StyledPgReactDataGrid = styled(PgReactDataGrid)(({theme})=>({
outlineColor: theme.palette.primary.main,
backgroundColor: theme.palette.primary.light,
color: theme.otherVars.qtDatagridSelectFg,
}
},
'& .rdg-row': {
'&:nth-of-type(even)': {
backgroundColor: theme.palette.grey[200],
},
'& .rdg-cell:nth-of-type(1)': {
backgroundColor: theme.palette.grey[600],
},
'& .rdg-cell:nth-of-type(1)[aria-selected="true"]':{
backgroundColor: theme.palette.primary.main,
color: theme.palette.primary.contrastText,
},
},
'& .rdg-header-row': {
'& .rdg-cell:nth-of-type(1)': {
backgroundColor: theme.palette.grey[600]
},
},
}));

export const RowInfoContext = React.createContext();
Expand Down

0 comments on commit f8fb78b

Please sign in to comment.