@momo-kits/foundation 0.80.8-beta.15 → 0.80.8-beta.17
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/Components.tsx +3 -3
- package/Application/Navigation.ts +1 -4
- package/Layout/Screen.tsx +12 -13
- package/Layout/styles.ts +6 -0
- package/package.json +1 -1
|
@@ -209,7 +209,7 @@ const HeaderBackground: React.FC<HeaderBackgroundProps> = ({
|
|
|
209
209
|
headerImage = undefined;
|
|
210
210
|
}
|
|
211
211
|
const opacity = animatedValue?.interpolate({
|
|
212
|
-
inputRange: [0,
|
|
212
|
+
inputRange: [0, 114],
|
|
213
213
|
outputRange: [0, 1],
|
|
214
214
|
extrapolate: 'clamp',
|
|
215
215
|
});
|
|
@@ -423,7 +423,7 @@ const HeaderAnimated: React.FC<HeaderAnimatedProps> = ({
|
|
|
423
423
|
}) => {
|
|
424
424
|
const scale = animatedValue.interpolate({
|
|
425
425
|
inputRange: [-300, 0, 300],
|
|
426
|
-
outputRange: [
|
|
426
|
+
outputRange: [4, 1, 1],
|
|
427
427
|
extrapolate: 'clamp',
|
|
428
428
|
});
|
|
429
429
|
const opacity = animatedValue.interpolate({
|
|
@@ -433,7 +433,7 @@ const HeaderAnimated: React.FC<HeaderAnimatedProps> = ({
|
|
|
433
433
|
});
|
|
434
434
|
const translateY = animatedValue.interpolate({
|
|
435
435
|
inputRange: [-300, 0],
|
|
436
|
-
outputRange: [-
|
|
436
|
+
outputRange: [-80, -2],
|
|
437
437
|
extrapolate: 'clamp',
|
|
438
438
|
});
|
|
439
439
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {NavigationProp} from '@react-navigation/native';
|
|
3
|
-
import {Alert} from 'react-native';
|
|
4
3
|
import {NavigationOptions, Theme} from './types';
|
|
5
4
|
import {HeaderRightAction} from './index';
|
|
6
5
|
import {getOptions} from './utils';
|
|
@@ -20,11 +19,9 @@ class Navigation {
|
|
|
20
19
|
const headerRight = params.headerRight?.({}) as React.ReactElement;
|
|
21
20
|
const type = headerRight?.type;
|
|
22
21
|
if (type !== HeaderRightAction && type !== HeaderToolkitAction) {
|
|
23
|
-
|
|
24
|
-
'Rule',
|
|
22
|
+
console.warn(
|
|
25
23
|
'headerRight contains element type of HeaderRightAction | HeaderToolkitAction, Please check again.',
|
|
26
24
|
);
|
|
27
|
-
delete params.headerRight;
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
return params;
|
package/Layout/Screen.tsx
CHANGED
|
@@ -181,18 +181,6 @@ const Screen = forwardRef(
|
|
|
181
181
|
* render top navigation banner
|
|
182
182
|
*/
|
|
183
183
|
const renderHeader = () => {
|
|
184
|
-
if (headerBackground != undefined) {
|
|
185
|
-
return (
|
|
186
|
-
<Image
|
|
187
|
-
source={{
|
|
188
|
-
uri: headerBackground,
|
|
189
|
-
}}
|
|
190
|
-
style={{
|
|
191
|
-
aspectRatio: 1.75,
|
|
192
|
-
}}
|
|
193
|
-
/>
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
184
|
if (typeof animatedHeader === 'function') {
|
|
197
185
|
return animatedHeader({animatedValue: animatedValue.current});
|
|
198
186
|
}
|
|
@@ -237,6 +225,17 @@ const Screen = forwardRef(
|
|
|
237
225
|
<View
|
|
238
226
|
style={[Styles.flex, {backgroundColor}]}
|
|
239
227
|
accessibilityLabel={`ScreenContainer`}>
|
|
228
|
+
{!!headerBackground && (
|
|
229
|
+
<>
|
|
230
|
+
<Image
|
|
231
|
+
source={{
|
|
232
|
+
uri: headerBackground,
|
|
233
|
+
}}
|
|
234
|
+
style={styles.extendedHeader}
|
|
235
|
+
/>
|
|
236
|
+
<View style={{height: heightHeader}} />
|
|
237
|
+
</>
|
|
238
|
+
)}
|
|
240
239
|
<KeyboardAvoidingView
|
|
241
240
|
style={Styles.flex}
|
|
242
241
|
enabled={enableKeyboardAvoidingView}
|
|
@@ -253,7 +252,7 @@ const Screen = forwardRef(
|
|
|
253
252
|
onScroll={handleScroll}
|
|
254
253
|
style={Styles.flex}>
|
|
255
254
|
<View
|
|
256
|
-
style={[styles.screenBanner, {maxHeight:
|
|
255
|
+
style={[styles.screenBanner, {maxHeight: 210 + layoutOffset}]}>
|
|
257
256
|
{renderHeader()}
|
|
258
257
|
</View>
|
|
259
258
|
{renderContent()}
|
package/Layout/styles.ts
CHANGED
|
@@ -2,6 +2,12 @@ import {StyleSheet} from 'react-native';
|
|
|
2
2
|
import {Radius, Spacing} from '../Consts';
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
|
+
extendedHeader: {
|
|
6
|
+
aspectRatio: 1.75,
|
|
7
|
+
position: 'absolute',
|
|
8
|
+
width: '100%',
|
|
9
|
+
height: 210,
|
|
10
|
+
},
|
|
5
11
|
screenBanner: {
|
|
6
12
|
width: '100%',
|
|
7
13
|
},
|