@asaleh37/ui-base 25.12.181 → 25.12.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/App.tsx +16 -3
- package/src/hooks/UseWindow.tsx +1 -1
package/package.json
CHANGED
package/src/components/App.tsx
CHANGED
|
@@ -103,14 +103,27 @@ const App: React.FC<AppInfo> = (props: AppInfo) => {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
const AppLayoutState = useSelector((state: any) => state.AppLayout);
|
|
106
|
-
let themeOptions
|
|
107
|
-
if (
|
|
108
|
-
themeOptions = { ...
|
|
106
|
+
let themeOptions;
|
|
107
|
+
if (props?.allowThemeChange) {
|
|
108
|
+
themeOptions = { ...LightThemeOptions };
|
|
109
|
+
if (AppLayoutState.themeMode === "dark") {
|
|
110
|
+
themeOptions = { ...DarkThemeOptions };
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
if (props?.appThemeMode) {
|
|
114
|
+
themeOptions =
|
|
115
|
+
props?.appThemeMode === "light"
|
|
116
|
+
? { ...LightThemeOptions }
|
|
117
|
+
: { ...DarkThemeOptions };
|
|
118
|
+
} else {
|
|
119
|
+
themeOptions = { ...LightThemeOptions };
|
|
120
|
+
}
|
|
109
121
|
}
|
|
110
122
|
const theme = createTheme({
|
|
111
123
|
direction: AppLayoutState.appDirection,
|
|
112
124
|
...themeOptions,
|
|
113
125
|
});
|
|
126
|
+
|
|
114
127
|
useEffect(() => {
|
|
115
128
|
document.title = props.documentTitle;
|
|
116
129
|
dispatch(AppInfoActions.setAppInfo(props));
|
package/src/hooks/UseWindow.tsx
CHANGED