@momo-kits/foundation 0.80.8-beta.16 → 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.
@@ -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
- Alert.alert(
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}
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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.80.8-beta.16",
3
+ "version": "0.80.8-beta.17",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {