44 lines
946 B
TypeScript
44 lines
946 B
TypeScript
import { createTheme, type PaletteMode } from "@mui/material/styles";
|
|
|
|
export function getAppTheme(mode: PaletteMode) {
|
|
const isDark = mode === "dark";
|
|
return createTheme({
|
|
palette: {
|
|
mode,
|
|
primary: { main: "#4f8cff" },
|
|
background: {
|
|
default: isDark ? "#0f172a" : "#f4f6fb",
|
|
paper: isDark ? "#111827" : "#ffffff",
|
|
},
|
|
},
|
|
shape: { borderRadius: 12 },
|
|
typography: {
|
|
fontFamily:
|
|
'Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
h5: { fontWeight: 700 },
|
|
},
|
|
components: {
|
|
MuiAppBar: {
|
|
styleOverrides: {
|
|
root: {
|
|
backdropFilter: "blur(8px)",
|
|
backgroundImage: "none",
|
|
},
|
|
},
|
|
},
|
|
MuiCard: {
|
|
styleOverrides: {
|
|
root: {
|
|
borderColor: isDark
|
|
? "rgba(148,163,184,0.25)"
|
|
: "rgba(15,23,42,0.08)",
|
|
boxShadow: isDark
|
|
? "0 2px 12px rgba(2,6,23,0.35)"
|
|
: "0 2px 8px rgba(15,23,42,0.04)",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|