mirror of
https://github.com/ente-io/ente.git
synced 2025-05-24 03:59:22 +00:00
29 lines
820 B
TypeScript
29 lines
820 B
TypeScript
import { createTheme } from "@mui/material";
|
|
import { getColors, type ColorAccentType } from "./colors";
|
|
import { getComponents } from "./components";
|
|
import { THEME_COLOR } from "./constants";
|
|
import { getPallette } from "./palette";
|
|
import { typography } from "./typography";
|
|
|
|
export const getTheme = (
|
|
themeColor: THEME_COLOR,
|
|
colorAccentType: ColorAccentType,
|
|
) => {
|
|
const colors = getColors(themeColor, colorAccentType);
|
|
const palette = getPallette(themeColor, colors);
|
|
const components = getComponents(colors, typography);
|
|
const theme = createTheme({
|
|
colors,
|
|
palette,
|
|
typography,
|
|
components,
|
|
shape: {
|
|
borderRadius: 8,
|
|
},
|
|
transitions: {
|
|
duration: { leavingScreen: 300 },
|
|
},
|
|
});
|
|
return theme;
|
|
};
|