chore(theme): define palette and typographies and override mui styles with this values, also add rtlProvider

This commit is contained in:
Sajad Mirjalili
2025-07-15 17:14:38 +03:30
parent 76d728c2b5
commit b42f6c37b9
16 changed files with 642 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import { useEffect } from 'react';
import { useLayoutEffect } from 'react';
import { useTranslation } from 'react-i18next';
/**
@@ -8,10 +8,10 @@ import { useTranslation } from 'react-i18next';
export const LanguageManager = () => {
const { i18n } = useTranslation();
useEffect(() => {
useLayoutEffect(() => {
const handleLanguageChange = (lng: string) => {
document.documentElement.dir = i18n.dir(lng);
document.documentElement.lang = lng;
document.documentElement.setAttribute('dir', i18n.dir(lng));
document.documentElement.setAttribute('lang', lng);
};
// Set initial values on component mount