@momo-kits/foundation 0.81.36-tracking.1 → 0.81.36-tracking.2
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 +4 -1
- package/Button/index.tsx +12 -2
- package/Image/index.tsx +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,10 @@ import Navigation from './Navigation';
|
|
|
4
4
|
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');
|
|
8
11
|
|
|
9
12
|
const StackScreen: React.FC<ScreenParams> = props => {
|
|
10
13
|
const {screen: Component, options}: ScreenParams = props.route.params;
|
package/Button/index.tsx
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
TouchableOpacityProps,
|
|
7
7
|
View,
|
|
8
8
|
} from 'react-native';
|
|
9
|
-
import {ScreenContext} from 'react-native/Libraries/Components/ScreenContext';
|
|
10
9
|
import LinearGradient from 'react-native-linear-gradient';
|
|
11
10
|
import {ApplicationContext} from '../Application';
|
|
12
11
|
import {Text} from '../Text';
|
|
@@ -16,6 +15,10 @@ import styles from './styles';
|
|
|
16
15
|
import {Icon} from '../Icon';
|
|
17
16
|
import {Loader} from '../Loader';
|
|
18
17
|
|
|
18
|
+
const {
|
|
19
|
+
ScreenContext,
|
|
20
|
+
} = require('react-native/Libraries/Components/ScreenContext');
|
|
21
|
+
|
|
19
22
|
const AnimationLinear = Animated.createAnimatedComponent(LinearGradient);
|
|
20
23
|
|
|
21
24
|
export interface ButtonProps extends TouchableOpacityProps {
|
|
@@ -82,6 +85,7 @@ const Button: FC<ButtonProps> = ({
|
|
|
82
85
|
loading = false,
|
|
83
86
|
title = 'Button',
|
|
84
87
|
onPress,
|
|
88
|
+
accessibilityLabel,
|
|
85
89
|
...rest
|
|
86
90
|
}) => {
|
|
87
91
|
const {theme, config} = useContext(ApplicationContext);
|
|
@@ -297,10 +301,16 @@ const Button: FC<ButtonProps> = ({
|
|
|
297
301
|
value={{
|
|
298
302
|
...screenInfo,
|
|
299
303
|
componentName: 'Button',
|
|
304
|
+
params: {
|
|
305
|
+
title,
|
|
306
|
+
accessibilityLabel,
|
|
307
|
+
},
|
|
300
308
|
}}>
|
|
301
309
|
<TouchableOpacity
|
|
302
310
|
{...rest}
|
|
303
|
-
accessibilityLabel={
|
|
311
|
+
accessibilityLabel={`${screenInfo.screenName}/Button/${
|
|
312
|
+
accessibilityLabel ?? title
|
|
313
|
+
}`}
|
|
304
314
|
activeOpacity={activeOpacity}
|
|
305
315
|
onPress={onPressButton}
|
|
306
316
|
style={buttonStyle}>
|
package/Image/index.tsx
CHANGED