Skip to content

Commit 91b7694

Browse files
committed
fix(theme): enhance
Signed-off-by: Sudhanshu Dasgupta <[email protected]>
1 parent ffb632d commit 91b7694

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

src/custom/ResponsiveDataTable.tsx

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ const dataTableTheme = (theme: Theme) =>
1212
width: '-webkit-fill-available',
1313
'@media (max-width: 500px)': {
1414
wordWrap: 'break-word'
15-
}
15+
},
16+
background: theme.palette.background.constant?.table,
17+
color: theme.palette.text.default
1618
}
1719
}
1820
},
1921
MUIDataTableHeadCell: {
2022
styleOverrides: {
2123
data: {
2224
fontWeight: 'bold',
23-
textTransform: 'uppercase'
25+
textTransform: 'uppercase',
26+
color: theme.palette.text.default
2427
},
2528
root: {
2629
fontWeight: 'bold',
@@ -74,6 +77,30 @@ const dataTableTheme = (theme: Theme) =>
7477
}
7578
}
7679
},
80+
MuiTableCell: {
81+
styleOverrides: {
82+
body: {
83+
color: theme.palette.text.default
84+
},
85+
root: {
86+
borderBottom: 'none'
87+
}
88+
}
89+
},
90+
MUIDataTablePagination: {
91+
styleOverrides: {
92+
toolbar: {
93+
color: theme.palette.text.default
94+
}
95+
}
96+
},
97+
MUIDataTableSelectCell: {
98+
styleOverrides: {
99+
headerCell: {
100+
background: theme.palette.background.constant?.table
101+
}
102+
}
103+
},
77104
MuiInput: {
78105
styleOverrides: {
79106
root: {

src/theme/palette.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ declare module '@mui/material/styles' {
3333
constant?: {
3434
disabled: string;
3535
white: string;
36+
table: string;
3637
};
3738
inverse?: string;
3839
brand?: Interactiveness;
@@ -84,6 +85,7 @@ declare module '@mui/material/styles' {
8485
constant?: {
8586
white: string;
8687
disabled: string;
88+
table: string;
8789
};
8890
inverse?: string;
8991
brand?: Interactiveness;
@@ -116,6 +118,7 @@ declare module '@mui/material/styles' {
116118
constant?: {
117119
white: string;
118120
disabled: string;
121+
table: string;
119122
};
120123
inverse?: string;
121124
brand?: Interactiveness;
@@ -252,7 +255,8 @@ export const lightModePalette: PaletteOptions = {
252255
code: Colors.charcoal[90],
253256
constant: {
254257
white: Colors.accentGrey[100],
255-
disabled: Colors.charcoal[70]
258+
disabled: Colors.charcoal[70],
259+
table: Colors.charcoal[100]
256260
},
257261
surfaces: Colors.accentGrey[100]
258262
},
@@ -365,7 +369,8 @@ export const darkModePalette: PaletteOptions = {
365369
code: Colors.accentGrey[90],
366370
constant: {
367371
white: Colors.accentGrey[100],
368-
disabled: Colors.charcoal[70]
372+
disabled: Colors.charcoal[70],
373+
table: '#363636'
369374
},
370375
surfaces: Colors.accentGrey[10]
371376
},

0 commit comments

Comments
 (0)