2024-02-24 08:18:57 +00:00
|
|
|
import { APPS } from "@ente/shared/apps/constants";
|
|
|
|
import { createTheme } from "@mui/material";
|
|
|
|
import { getColors } from "./colors";
|
|
|
|
import { getComponents } from "./components";
|
|
|
|
import { THEME_COLOR } from "./constants";
|
|
|
|
import { getPallette } from "./palette";
|
|
|
|
import { typography } from "./typography";
|
2023-03-29 17:58:23 +00:00
|
|
|
|
2023-04-14 10:58:53 +00:00
|
|
|
export const getTheme = (themeColor: THEME_COLOR, appName: APPS) => {
|
|
|
|
const colors = getColors(themeColor, appName);
|
|
|
|
const palette = getPallette(themeColor, colors);
|
2023-03-30 07:15:34 +00:00
|
|
|
const components = getComponents(colors, typography);
|
2023-03-29 17:58:23 +00:00
|
|
|
const theme = createTheme({
|
2023-03-30 07:15:34 +00:00
|
|
|
colors,
|
2023-03-29 17:58:23 +00:00
|
|
|
palette,
|
|
|
|
typography,
|
|
|
|
components,
|
2023-03-30 07:15:34 +00:00
|
|
|
shape: {
|
|
|
|
borderRadius: 8,
|
|
|
|
},
|
2023-05-29 08:05:02 +00:00
|
|
|
transitions: {
|
|
|
|
duration: { leavingScreen: 300 },
|
|
|
|
},
|
2023-03-29 17:58:23 +00:00
|
|
|
});
|
|
|
|
return theme;
|
|
|
|
};
|