@momo-kits/foundation 0.81.21 → 0.81.23
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 +8 -1
- package/Image/styles.ts +0 -2
- package/Layout/Screen.tsx +6 -1
- package/package.json +1 -1
package/Image/index.tsx
CHANGED
|
@@ -10,7 +10,13 @@ import {ImageProps} from './types';
|
|
|
10
10
|
|
|
11
11
|
type Status = 'success' | 'loading' | 'error';
|
|
12
12
|
|
|
13
|
-
const Image: React.FC<ImageProps> = ({
|
|
13
|
+
const Image: React.FC<ImageProps> = ({
|
|
14
|
+
style,
|
|
15
|
+
source,
|
|
16
|
+
loading,
|
|
17
|
+
children,
|
|
18
|
+
...rest
|
|
19
|
+
}) => {
|
|
14
20
|
const {theme} = useContext(ApplicationContext);
|
|
15
21
|
const error = useRef(false);
|
|
16
22
|
const [status, setStatus] = useState<Status>('success');
|
|
@@ -32,6 +38,7 @@ const Image: React.FC<ImageProps> = ({style, source, loading, ...rest}) => {
|
|
|
32
38
|
</View>
|
|
33
39
|
);
|
|
34
40
|
}
|
|
41
|
+
return children;
|
|
35
42
|
};
|
|
36
43
|
|
|
37
44
|
return (
|
package/Image/styles.ts
CHANGED
package/Layout/Screen.tsx
CHANGED
|
@@ -108,8 +108,13 @@ const Screen = forwardRef(
|
|
|
108
108
|
let handleScroll;
|
|
109
109
|
let headerBackground: string | undefined = undefined;
|
|
110
110
|
let Component: any = View;
|
|
111
|
+
let keyboardVerticalOffset = heightHeader - 20;
|
|
111
112
|
animatedValue.current = undefined;
|
|
112
113
|
|
|
114
|
+
if (useExtendedHeader || animatedHeader) {
|
|
115
|
+
keyboardVerticalOffset = -20;
|
|
116
|
+
}
|
|
117
|
+
|
|
113
118
|
if (useExtendedHeader) {
|
|
114
119
|
headerBackground = theme.assets?.headerBackground;
|
|
115
120
|
}
|
|
@@ -267,7 +272,7 @@ const Screen = forwardRef(
|
|
|
267
272
|
<KeyboardAvoidingView
|
|
268
273
|
style={Styles.flex}
|
|
269
274
|
enabled={enableKeyboardAvoidingView}
|
|
270
|
-
keyboardVerticalOffset={
|
|
275
|
+
keyboardVerticalOffset={keyboardVerticalOffset}
|
|
271
276
|
behavior={Platform.select({
|
|
272
277
|
ios: 'padding',
|
|
273
278
|
android: undefined,
|