recode and add editor config

This commit is contained in:
Amirhossein Mahmoodi
2023-07-31 15:27:34 +03:30
parent 8a3e82bb9a
commit 51228f3c02
88 changed files with 5121 additions and 4138 deletions

View File

@@ -1,38 +1,38 @@
import createCache from "@emotion/cache";
import { prefixer } from "stylis";
import {prefixer} from "stylis";
import stylisRTLPlugin from "stylis-plugin-rtl";
const isBrowser = typeof document !== "undefined";
export const createEmotionCacheLtr = () => {
let insertionPoint;
let insertionPoint;
if (isBrowser) {
const emotionInsertionPoint = document.querySelector(
'meta[name="emotion-insertion-point"]'
);
insertionPoint = emotionInsertionPoint ?? undefined;
}
if (isBrowser) {
const emotionInsertionPoint = document.querySelector(
'meta[name="emotion-insertion-point"]'
);
insertionPoint = emotionInsertionPoint ?? undefined;
}
return createCache({
key: "mui-style",
insertionPoint,
});
return createCache({
key: "mui-style",
insertionPoint,
});
};
export const createEmotionCacheRtl = () => {
let insertionPoint;
let insertionPoint;
if (isBrowser) {
const emotionInsertionPoint = document.querySelector(
'meta[name="emotion-insertion-point"]'
);
insertionPoint = emotionInsertionPoint ?? undefined;
}
if (isBrowser) {
const emotionInsertionPoint = document.querySelector(
'meta[name="emotion-insertion-point"]'
);
insertionPoint = emotionInsertionPoint ?? undefined;
}
return createCache({
key: "muirtl",
stylisPlugins: [prefixer, stylisRTLPlugin],
insertionPoint,
});
return createCache({
key: "muirtl",
stylisPlugins: [prefixer, stylisRTLPlugin],
insertionPoint,
});
};

View File

@@ -1,12 +1,12 @@
import { createTheme } from "@mui/material/styles";
import {createTheme} from "@mui/material/styles";
import theme from "./theme";
const themeRtl = createTheme({
direction: "rtl",
typography: {
fontFamily: `IRANSans, sans-serif`,
},
...theme,
direction: "rtl",
typography: {
fontFamily: `IRANSans, sans-serif`,
},
...theme,
});
export default themeRtl;

View File

@@ -1,18 +1,18 @@
const theme = {
palette: {
primary: {
main: "#084070",
contrastText: "#fff",
light: "#2c6291",
dark: "#11293e",
palette: {
primary: {
main: "#084070",
contrastText: "#fff",
light: "#2c6291",
dark: "#11293e",
},
secondary: {
main: "#FF4E00",
contrastText: "#fff",
light: "#ed743e",
dark: "#ad3a07",
},
},
secondary: {
main: "#FF4E00",
contrastText: "#fff",
light: "#ed743e",
dark: "#ad3a07",
},
},
};
export default theme;