@momo-kits/foundation 0.81.36-tracking.2 → 0.81.37
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/Application/StackScreen.tsx +2 -10
- package/Button/index.tsx +15 -33
- package/package.json +1 -1
|
@@ -5,10 +5,6 @@ import {ApplicationContext} from './index';
|
|
|
5
5
|
import {GridSystem} from '../Layout';
|
|
6
6
|
import {useHeaderHeight} from '@react-navigation/stack';
|
|
7
7
|
|
|
8
|
-
const {
|
|
9
|
-
ScreenContext,
|
|
10
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
11
|
-
|
|
12
8
|
const StackScreen: React.FC<ScreenParams> = props => {
|
|
13
9
|
const {screen: Component, options}: ScreenParams = props.route.params;
|
|
14
10
|
const {theme, showGrid, navigator} = useContext(ApplicationContext);
|
|
@@ -68,14 +64,10 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
68
64
|
}, []);
|
|
69
65
|
|
|
70
66
|
return (
|
|
71
|
-
|
|
72
|
-
value={{
|
|
73
|
-
screenName: Component.name,
|
|
74
|
-
elementTracking: navigator?.maxApi?.elementTracking,
|
|
75
|
-
}}>
|
|
67
|
+
<>
|
|
76
68
|
<Component heightHeader={heightHeader} {...params} />
|
|
77
69
|
{showGrid && <GridSystem />}
|
|
78
|
-
|
|
70
|
+
</>
|
|
79
71
|
);
|
|
80
72
|
};
|
|
81
73
|
|
package/Button/index.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
TouchableOpacityProps,
|
|
7
7
|
View,
|
|
8
8
|
} from 'react-native';
|
|
9
|
+
|
|
9
10
|
import LinearGradient from 'react-native-linear-gradient';
|
|
10
11
|
import {ApplicationContext} from '../Application';
|
|
11
12
|
import {Text} from '../Text';
|
|
@@ -15,10 +16,6 @@ import styles from './styles';
|
|
|
15
16
|
import {Icon} from '../Icon';
|
|
16
17
|
import {Loader} from '../Loader';
|
|
17
18
|
|
|
18
|
-
const {
|
|
19
|
-
ScreenContext,
|
|
20
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
21
|
-
|
|
22
19
|
const AnimationLinear = Animated.createAnimatedComponent(LinearGradient);
|
|
23
20
|
|
|
24
21
|
export interface ButtonProps extends TouchableOpacityProps {
|
|
@@ -85,7 +82,6 @@ const Button: FC<ButtonProps> = ({
|
|
|
85
82
|
loading = false,
|
|
86
83
|
title = 'Button',
|
|
87
84
|
onPress,
|
|
88
|
-
accessibilityLabel,
|
|
89
85
|
...rest
|
|
90
86
|
}) => {
|
|
91
87
|
const {theme, config} = useContext(ApplicationContext);
|
|
@@ -98,8 +94,6 @@ const Button: FC<ButtonProps> = ({
|
|
|
98
94
|
end: {x: 0, y: 0.5},
|
|
99
95
|
};
|
|
100
96
|
}
|
|
101
|
-
|
|
102
|
-
const screenInfo = useContext<any>(ScreenContext);
|
|
103
97
|
const getSizeStyle = () => {
|
|
104
98
|
const styleSheet: {[key: string]: any} = styles;
|
|
105
99
|
return styleSheet[size ?? 'small'];
|
|
@@ -297,32 +291,20 @@ const Button: FC<ButtonProps> = ({
|
|
|
297
291
|
const activeOpacity = type === 'disabled' ? 0.75 : 0.5;
|
|
298
292
|
|
|
299
293
|
return (
|
|
300
|
-
<
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
{...
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
activeOpacity={activeOpacity}
|
|
315
|
-
onPress={onPressButton}
|
|
316
|
-
style={buttonStyle}>
|
|
317
|
-
{renderLeading()}
|
|
318
|
-
{renderTitle()}
|
|
319
|
-
{renderTrailing()}
|
|
320
|
-
{gradientPros && (
|
|
321
|
-
<AnimationLinear {...gradientPros} style={styles.gradientView} />
|
|
322
|
-
)}
|
|
323
|
-
{gradientPros && <View style={styles.strokeView} />}
|
|
324
|
-
</TouchableOpacity>
|
|
325
|
-
</ScreenContext.Provider>
|
|
294
|
+
<TouchableOpacity
|
|
295
|
+
{...rest}
|
|
296
|
+
accessibilityLabel={`Button/${title}`}
|
|
297
|
+
activeOpacity={activeOpacity}
|
|
298
|
+
onPress={onPressButton}
|
|
299
|
+
style={buttonStyle}>
|
|
300
|
+
{renderLeading()}
|
|
301
|
+
{renderTitle()}
|
|
302
|
+
{renderTrailing()}
|
|
303
|
+
{gradientPros && (
|
|
304
|
+
<AnimationLinear {...gradientPros} style={styles.gradientView} />
|
|
305
|
+
)}
|
|
306
|
+
{gradientPros && <View style={styles.strokeView} />}
|
|
307
|
+
</TouchableOpacity>
|
|
326
308
|
);
|
|
327
309
|
};
|
|
328
310
|
|