Files
Checkmate/Client/src/Utils/Theme.js
T

185 lines
4.0 KiB
JavaScript
Raw Normal View History

2024-05-06 12:10:16 -07:00
import { createTheme } from "@mui/material";
// Colors for MUI theme
const primaryMain = "#1570EF";
2024-05-06 12:10:16 -07:00
const secondaryMain = "#475467";
const tertiaryMain = "#475467";
const tertiaryLinkHover = "#eff8ff";
2024-05-06 12:10:16 -07:00
// Section colors
const sectionBorder = "#D0D5DD";
const sectionBg = "#F8F9F8";
2024-05-14 11:06:34 +03:30
// Other Colors
const otherColorsBlackish = "#101828";
const otherColorsBluishGray = "#344054";
const otherColorsGraishWhite = "#eaecf0";
const otherColorsPurple = "#7f56d9";
const otherColorsWhite = "#fff";
const otherColorsGraishWhiteLight = "#f2f2f2";
const otherColorsStrongBlue = "#f2f2f2";
2024-06-17 22:30:35 -04:00
const otherColorsSlateGray = "#667085";
const otherColorsFillGray = "#f4f4f4";
2024-06-25 17:38:40 -04:00
//box shadow
const shadow =
"0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03)";
2024-05-14 11:06:34 +03:30
// Global Font Family
const fontFamilyDefault =
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
2024-05-14 11:06:34 +03:30
2024-05-06 12:10:16 -07:00
const theme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
2024-05-06 12:10:16 -07:00
palette: {
2024-08-26 19:54:48 -04:00
common: { main: "#1570ef" },
text: {
primary: "#1c2130",
secondary: "#344054",
tertiary: "#475467",
accent: "#838c99",
},
background: {
2024-08-27 12:18:25 -04:00
main: "#FFFFFF",
alt: "#FCFCFD",
2024-08-26 19:54:48 -04:00
fill: "#F4F4F4",
accent: "#f9fafb",
},
border: { light: "#eaecf0", dark: "#d0d5dd" },
2024-08-27 12:18:25 -04:00
info: {
text: "#475467",
main: "#475467",
bg: "#ffffff",
light: "#ffffff",
border: "#D0D5DD",
},
2024-08-26 19:54:48 -04:00
success: { main: "#17b26a", light: "#d4f4e1", bg: "#ecfdf3" },
2024-08-27 12:18:25 -04:00
error: {
text: "#f04438",
main: "#d32f2f",
light: "#fbd1d1",
bg: "#f9eced",
border: "#f04438",
},
warning: {
text: "#DC6803",
main: "#fdb022",
light: "#fffcf5",
bg: "#ffecbc",
border: "#fec84b",
},
2024-08-26 19:54:48 -04:00
unresolved: { main: "#4e5ba6", light: "#e2eaf7", bg: "#f2f4f7" },
other: {},
primary: {
main: primaryMain,
},
2024-05-06 12:10:16 -07:00
secondary: {
main: secondaryMain,
},
tertiary: {
main: tertiaryMain,
linkHover: tertiaryLinkHover,
2024-05-06 12:10:16 -07:00
},
section: {
borderColor: sectionBorder,
bgColor: sectionBg,
},
otherColors: {
blackish: otherColorsBlackish,
bluishGray: otherColorsBluishGray,
graishWhite: otherColorsGraishWhite,
purple: otherColorsPurple,
white: otherColorsWhite,
graishWhiteLight: otherColorsGraishWhiteLight,
strongBlue: otherColorsStrongBlue,
2024-06-17 22:30:35 -04:00
slateGray: otherColorsSlateGray,
fillGray: otherColorsFillGray,
},
},
2024-08-27 12:18:25 -04:00
spacing: 2,
components: {},
shape: {
2024-08-27 12:18:25 -04:00
borderRadius: 2,
2024-06-26 19:06:10 -04:00
borderThick: 2,
2024-06-25 17:38:40 -04:00
boxShadow: shadow,
2024-05-06 12:10:16 -07:00
},
gap: {
2024-07-12 18:45:23 -04:00
xs: "4px",
small: "8px",
medium: "12px",
2024-07-06 14:33:36 -04:00
ml: "16px",
2024-08-03 11:57:07 -04:00
mlplus: "20px",
large: "24px",
lgplus: "32px",
2024-07-06 14:33:36 -04:00
xl: "40px",
2024-07-15 18:14:20 -04:00
xxl: "60px",
triplexl: "120px",
2024-07-06 14:33:36 -04:00
},
alert: {
info: {
color: secondaryMain,
bg: otherColorsWhite,
2024-07-12 18:45:23 -04:00
border: sectionBorder,
2024-07-06 14:33:36 -04:00
},
error: {
color: "#d92d20",
2024-07-06 14:44:04 -04:00
bg: "hsla(0, 100%, 52%, 0.03)",
2024-07-06 14:33:36 -04:00
border: "#f04438",
},
warning: {
2024-07-11 18:05:41 -04:00
color: "#DC6803",
bg: "#fffcf5",
2024-07-12 18:45:23 -04:00
border: "#fec84b",
2024-07-06 14:33:36 -04:00
},
},
2024-07-30 01:59:58 -04:00
//add more as needed
label: {
up: {
2024-08-01 19:10:39 -04:00
borderColor: "#D4F4E1",
2024-07-30 01:59:58 -04:00
bgColor: "#ecfdf3",
dotColor: "#17B26A",
},
down: {
2024-08-01 19:10:39 -04:00
borderColor: "#fbd1d1",
2024-07-30 01:59:58 -04:00
bgColor: "#f9eced",
2024-08-01 19:10:39 -04:00
dotColor: "#f04438",
2024-07-30 01:59:58 -04:00
},
"cannot resolve": {
2024-08-01 19:10:39 -04:00
borderColor: "#e2eaf7",
2024-07-30 01:59:58 -04:00
bgColor: "#f2f4f7",
2024-08-01 19:10:39 -04:00
dotColor: "#4e5ba6",
2024-07-30 01:59:58 -04:00
},
},
2024-08-03 11:57:07 -04:00
pie: {
green: {
stroke: "#17b26a",
strokeBg: "#d4f4e1",
text: "#079455",
bg: "#ecfdf3",
2024-08-06 13:00:56 -04:00
shape: "circle",
},
yellow: {
stroke: "#fdb022",
strokeBg: "rgba(255, 192, 34, 0.3)",
text: "#dc6803",
bg: "#fffcf5",
2024-08-06 13:00:56 -04:00
shape: "square",
},
red: {
stroke: "#f04438",
strokeBg: "#ffecea",
text: "#f04438",
bg: "#ffeaea",
2024-08-06 13:00:56 -04:00
shape: "triangle",
},
default: {
stroke: "#4e5ba6",
strokeBg: "#f2f4f7",
text: "#4e5ba6",
bg: "#f2f4f7",
2024-08-06 13:00:56 -04:00
shape: "",
},
2024-08-03 11:57:07 -04:00
},
2024-05-06 12:10:16 -07:00
});
export default theme;