@momo-kits/foundation 0.112.1-optimize.2 → 0.112.1-optimize.4

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.
@@ -36,6 +36,16 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
36
36
  const [showGrid, setShowGrid] = useState(false);
37
37
  const [currentContext, setCurrentContext] = useState({});
38
38
 
39
+ let headerBackground = context?.designConfig?.headerBar;
40
+ let headerGradient = theme.colors?.gradient;
41
+
42
+ if (theme.assets?.headerBackground) {
43
+ headerBackground = theme.assets?.headerBackground;
44
+ }
45
+ if (context?.designConfig?.headerGradient) {
46
+ headerGradient = context?.designConfig?.headerGradient;
47
+ }
48
+
39
49
  /**
40
50
  * inject data for navigator
41
51
  */
@@ -96,11 +106,6 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
96
106
  });
97
107
  };
98
108
 
99
- const headerBackground =
100
- theme.assets?.headerBackground || context?.designConfig.headerBar;
101
- const headerGradient =
102
- context?.designConfig.headerGradient || theme.colors?.gradient;
103
-
104
109
  navigator.current.setCurrentContext = setCurrentContext;
105
110
 
106
111
  return (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.112.1-optimize.2",
3
+ "version": "0.112.1-optimize.4",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},