@momo-kits/foundation 0.120.0-beta.21 → 0.120.0-beta.22
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.
|
@@ -12,10 +12,10 @@ import {PopupNotify} from '../../Popup';
|
|
|
12
12
|
import {Tool, ToolGroup} from '../types';
|
|
13
13
|
import {Icon} from '../../Icon';
|
|
14
14
|
import {scaleSize, Text} from '../../Text';
|
|
15
|
-
import {DesignSystemWhiteList} from '../NavigationContainer';
|
|
16
15
|
|
|
17
16
|
const DID_SYNC_NEW_HOME = 'did_sync_new_home';
|
|
18
|
-
const
|
|
17
|
+
const context = useContext<any>(MiniAppContext);
|
|
18
|
+
const isWhiteList = context?.designSystemConfig?.isWhiteList || false;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* main component for header right
|
|
@@ -261,10 +261,6 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
261
261
|
group?.items?.some?.(tool => tool?.showBadge)
|
|
262
262
|
);
|
|
263
263
|
|
|
264
|
-
const iconClose = isWhiteList
|
|
265
|
-
? '16_basic_home'
|
|
266
|
-
: '16_navigation_close_circle';
|
|
267
|
-
|
|
268
264
|
return (
|
|
269
265
|
<View style={Styles.row}>
|
|
270
266
|
{useShortcut && (
|
|
@@ -301,7 +297,13 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
301
297
|
onPress={onClose}
|
|
302
298
|
style={styles.toolkitButton}
|
|
303
299
|
hitSlop={{top: 7, bottom: 7, left: 0, right: 7}}>
|
|
304
|
-
<Icon
|
|
300
|
+
<Icon
|
|
301
|
+
color={tintColor}
|
|
302
|
+
source={
|
|
303
|
+
isWhiteList ? '16_basic_home' : '16_navigation_close_circle'
|
|
304
|
+
}
|
|
305
|
+
size={20}
|
|
306
|
+
/>
|
|
305
307
|
</TouchableOpacity>
|
|
306
308
|
</View>
|
|
307
309
|
</View>
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createStackNavigator,
|
|
9
9
|
StackNavigationOptions,
|
|
10
10
|
} from '@react-navigation/stack';
|
|
11
|
-
import {DeviceEventEmitter
|
|
11
|
+
import {DeviceEventEmitter} from 'react-native';
|
|
12
12
|
import StackScreen from './StackScreen';
|
|
13
13
|
import ModalScreen from './ModalScreen';
|
|
14
14
|
import Navigator from './Navigator';
|
|
@@ -19,9 +19,6 @@ import Localize from './Localize';
|
|
|
19
19
|
import {defaultTheme} from '../Consts';
|
|
20
20
|
|
|
21
21
|
const Stack = createStackNavigator();
|
|
22
|
-
export let DesignSystemWhiteList: boolean | undefined = undefined;
|
|
23
|
-
let setDesignSystemWhiteList = (value: boolean) =>
|
|
24
|
-
(DesignSystemWhiteList = value);
|
|
25
22
|
|
|
26
23
|
const NavigationContainer: React.FC<NavigationContainerProps> = ({
|
|
27
24
|
screen,
|
|
@@ -39,21 +36,14 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
|
|
|
39
36
|
const [showGrid, setShowGrid] = useState(false);
|
|
40
37
|
const [currentContext, setCurrentContext] = useState({});
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
(Text as any).defaultProps = {
|
|
45
|
-
...(Text as any).defaultProps,
|
|
46
|
-
allowFontScaling: false,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
let headerBackground = context?.designSystemConfig?.config?.headerBar;
|
|
39
|
+
let headerBackground = context?.designConfig?.headerBar;
|
|
50
40
|
let headerGradient = theme.colors?.gradient;
|
|
51
41
|
|
|
52
42
|
if (theme.assets?.headerBackground) {
|
|
53
43
|
headerBackground = theme.assets?.headerBackground;
|
|
54
44
|
}
|
|
55
|
-
if (context?.
|
|
56
|
-
headerGradient = context?.
|
|
45
|
+
if (context?.designConfig?.headerGradient) {
|
|
46
|
+
headerGradient = context?.designConfig?.headerGradient;
|
|
57
47
|
}
|
|
58
48
|
|
|
59
49
|
/**
|
|
@@ -252,4 +242,4 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
|
|
|
252
242
|
);
|
|
253
243
|
};
|
|
254
244
|
|
|
255
|
-
export {ApplicationContext, NavigationContainer
|
|
245
|
+
export {ApplicationContext, NavigationContainer};
|