@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "25.12.181",
3
+ "version": "25.12.211",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -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 = { ...LightThemeOptions };
107
- if (AppLayoutState.themeMode === "dark") {
108
- themeOptions = { ...DarkThemeOptions };
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));
@@ -84,7 +84,7 @@ export const useWindow = (props: TemplateWindowProp) => {
84
84
  }}
85
85
  color="secondary"
86
86
  >
87
- <FontAwesomeIcon icon="xmark-square" />
87
+ <FontAwesomeIcon icon="xmark-square" color="white" />
88
88
  </IconButton>
89
89
  </Toolbar>
90
90
  </AppBar>