@momo-kits/foundation 0.92.6-rc.7 → 0.92.6-rc.8

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/Image/index.tsx CHANGED
@@ -2,7 +2,11 @@ import React, {useContext, useEffect, useRef, useState} from 'react';
2
2
  import {StyleSheet, View} from 'react-native';
3
3
  import FastImage, {Source} from 'react-native-fast-image';
4
4
  import styles from './styles';
5
- import {ApplicationContext, ComponentContext, MiniAppContext} from '../Application';
5
+ import {
6
+ ApplicationContext,
7
+ ComponentContext,
8
+ MiniAppContext,
9
+ } from '../Application';
6
10
  import {Skeleton} from '../Skeleton';
7
11
  import {Icon} from '../Icon';
8
12
  import {Styles} from '../Consts';
@@ -30,9 +34,9 @@ const Image: React.FC<ImageProps> = ({
30
34
  };
31
35
 
32
36
  useEffect(() => {
33
- if(app.enableAutoId){
37
+ if (app.enableAutoId) {
34
38
  component?.addChildren?.(test.accessibilityLabel, 'add');
35
- return () => component?.addChildren(test.accessibilityLabel, 'remove');
39
+ return () => component?.addChildren?.(test.accessibilityLabel, 'remove');
36
40
  }
37
41
  }, []);
38
42
 
@@ -57,37 +61,37 @@ const Image: React.FC<ImageProps> = ({
57
61
  };
58
62
 
59
63
  return (
60
- <FastImage
61
- {...rest}
62
- {...test}
63
- source={source}
64
- style={[styles.container, style]}
65
- onProgress={() => {
66
- error.current = false;
67
- if (status !== 'loading' && loading) {
68
- setStatus('loading');
69
- }
70
- }}
71
- onLoadStart={() => {
72
- error.current = false;
73
- }}
74
- onLoad={() => {
75
- error.current = false;
76
- }}
77
- onLoadEnd={() => {
78
- let current: Status = 'success';
79
- if (error.current) {
80
- current = 'error';
81
- }
82
- if (status !== current) {
83
- setStatus(current);
84
- }
85
- }}
86
- onError={() => {
87
- error.current = true;
88
- }}>
89
- {renderContent()}
90
- </FastImage>
64
+ <FastImage
65
+ {...rest}
66
+ {...test}
67
+ source={source}
68
+ style={[styles.container, style]}
69
+ onProgress={() => {
70
+ error.current = false;
71
+ if (status !== 'loading' && loading) {
72
+ setStatus('loading');
73
+ }
74
+ }}
75
+ onLoadStart={() => {
76
+ error.current = false;
77
+ }}
78
+ onLoad={() => {
79
+ error.current = false;
80
+ }}
81
+ onLoadEnd={() => {
82
+ let current: Status = 'success';
83
+ if (error.current) {
84
+ current = 'error';
85
+ }
86
+ if (status !== current) {
87
+ setStatus(current);
88
+ }
89
+ }}
90
+ onError={() => {
91
+ error.current = true;
92
+ }}>
93
+ {renderContent()}
94
+ </FastImage>
91
95
  );
92
96
  };
93
97
 
package/Input/Input.tsx CHANGED
@@ -50,6 +50,7 @@ const Input = forwardRef(
50
50
  params,
51
51
  hintText,
52
52
  accessibilityLabel,
53
+ editable = true,
53
54
  ...props
54
55
  }: InputProps,
55
56
  ref,
@@ -168,7 +169,7 @@ const Input = forwardRef(
168
169
  <TextInput
169
170
  {...props}
170
171
  accessibilityLabel={accessibilityLabel}
171
- editable={props.editable && !disabled}
172
+ editable={editable && !disabled}
172
173
  secureTextEntry={secure}
173
174
  textAlignVertical="center"
174
175
  ref={inputRef}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.6-rc.7",
3
+ "version": "0.92.6-rc.8",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},