Skip to content

Commit 4d82ccd

Browse files
committed
fix: adjust dark mode UI colors and borders for elevated containers
1 parent 8d17610 commit 4d82ccd

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

src/context/ThemeContext.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,19 @@ const ThemeWrapper = ({ children }: { children: ReactNode }) => {
3232
};
3333

3434
const muiTheme: Theme = useMemo(
35-
() => createTheme({ palette: { mode } }),
35+
() =>
36+
createTheme({
37+
palette: {
38+
mode,
39+
...(mode === 'dark' && {
40+
background: {
41+
default: '#1f2937', // Tailwind gray-800
42+
paper: '#374151', // Tailwind gray-700 for natural elevation
43+
},
44+
divider: 'rgba(255, 255, 255, 0.12)', // Subtle border
45+
}),
46+
},
47+
}),
3648
[mode]
3749
);
3850

src/pages/Contributors/Contributors.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ const ContributorsPage = () => {
7878
textAlign: "center",
7979
p: 2,
8080
borderRadius: "10px",
81-
border: "1px solid #E0E0E0",
81+
border: 1,
82+
borderColor: "divider",
8283
boxShadow: "0 4px 10px rgba(0,0,0,0.1)",
83-
transition: "transform 0.3s ease-in-out",
84+
transition: "transform 0.3s ease-in-out, border-color 0.3s",
8485
"&:hover": {
8586
transform: "scale(1.05)",
8687
boxShadow: "0 8px 15px rgba(0,0,0,0.2)",
87-
borderColor: "#C0C0C0",
88-
outlineColor: "#B3B3B3",
88+
borderColor: "text.disabled",
8989
},
9090
}}
9191
>

src/pages/Tracker/Tracker.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const Home: React.FC = () => {
166166
return (
167167
<Container maxWidth="lg" sx={{ mt: 4, minHeight: "80vh", color: theme.palette.text.primary }}>
168168
{/* Auth Form */}
169-
<Paper elevation={1} sx={{ p: 2, mb: 4, backgroundColor: theme.palette.background.paper }}>
169+
<Paper elevation={1} sx={{ p: 2, mb: 4, backgroundColor: theme.palette.background.paper, border: 1, borderColor: "divider" }}>
170170
<form onSubmit={handleSubmit}>
171171
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap" }}>
172172
<TextField
@@ -299,7 +299,7 @@ const Home: React.FC = () => {
299299

300300
{loading ? (
301301
<Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
302-
<TableContainer component={Paper}>
302+
<TableContainer component={Paper} sx={{ border: 1, borderColor: "divider" }}>
303303
<Table size="small">
304304
<TableHead>
305305
<TableRow>
@@ -341,6 +341,8 @@ const Home: React.FC = () => {
341341
p: 4,
342342
textAlign: "center",
343343
backgroundColor: theme.palette.background.paper,
344+
border: 1,
345+
borderColor: "divider",
344346
}}
345347
>
346348
<Typography variant="h6" gutterBottom>
@@ -355,7 +357,7 @@ const Home: React.FC = () => {
355357

356358
<Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
357359

358-
<TableContainer component={Paper}>
360+
<TableContainer component={Paper} sx={{ border: 1, borderColor: "divider" }}>
359361

360362
<Table size="small">
361363

0 commit comments

Comments
 (0)