@momo-kits/foundation 0.92.21-beta.7 → 0.92.21-beta.9

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.
@@ -506,7 +506,7 @@ const HeaderAnimated: React.FC<HeaderAnimatedProps> = ({
506
506
  * Header extended with background image
507
507
  * @constructor
508
508
  */
509
- const HeaderExtendBackground: React.FC<{
509
+ const HeaderExtendHeader: React.FC<{
510
510
  headerType?: HeaderType;
511
511
  animatedValue: Animated.Value;
512
512
  heightHeader: number;
@@ -551,10 +551,10 @@ const HeaderExtendBackground: React.FC<{
551
551
  }),
552
552
  }}>
553
553
  <AnimatedInputSearch
554
- hasColorBG
555
554
  animatedValue={animatedValue}
556
555
  navigation={navigation}
557
556
  {...inputSearchProps}
557
+ hasColorBG={true}
558
558
  />
559
559
  </Animated.View>
560
560
  </View>
@@ -564,12 +564,25 @@ const HeaderExtendBackground: React.FC<{
564
564
  if (headerType === 'extended') {
565
565
  return (
566
566
  <>
567
- <Image
568
- source={{
569
- uri: theme.assets?.headerBackground,
570
- }}
571
- style={styles.extendedHeader}
572
- />
567
+ <Animated.View
568
+ style={[
569
+ styles.headerBox,
570
+ {
571
+ height: heightAnimated.current.interpolate({
572
+ inputRange: [0, 100],
573
+ outputRange: [heightHeader + 52, heightHeader],
574
+ extrapolate: 'clamp',
575
+ }),
576
+ },
577
+ ]}>
578
+ <Image
579
+ source={{
580
+ uri: theme.assets?.headerBackground,
581
+ }}
582
+ style={styles.headerBackground}
583
+ />
584
+ </Animated.View>
585
+
573
586
  <Animated.View
574
587
  style={{
575
588
  justifyContent: 'flex-end',
@@ -591,23 +604,12 @@ const HeaderExtendBackground: React.FC<{
591
604
 
592
605
  return (
593
606
  <>
594
- <View
595
- style={{
596
- height: heightHeader + 52,
597
- width: '100%',
598
- position: 'absolute',
599
- overflow: 'hidden',
600
- }}>
607
+ <View style={[styles.headerBox, {height: heightHeader}]}>
601
608
  <Image
602
609
  source={{
603
610
  uri: theme.assets?.headerBackground,
604
611
  }}
605
- style={{
606
- width: '100%',
607
- height: undefined,
608
- position: 'absolute',
609
- aspectRatio: 1.75,
610
- }}
612
+ style={styles.headerBackground}
611
613
  />
612
614
  </View>
613
615
 
@@ -722,6 +724,11 @@ const styles = StyleSheet.create({
722
724
  width: '100%',
723
725
  height: 210,
724
726
  },
727
+ headerBox: {
728
+ width: '100%',
729
+ position: 'absolute',
730
+ overflow: 'hidden',
731
+ },
725
732
  });
726
733
 
727
734
  export {
@@ -733,5 +740,5 @@ export {
733
740
  HeaderCustom,
734
741
  HeaderAnimated,
735
742
  HeaderRight,
736
- HeaderExtendBackground,
743
+ HeaderExtendHeader,
737
744
  };
package/Layout/Screen.tsx CHANGED
@@ -31,7 +31,7 @@ import {Card, Section, validateChildren} from './index';
31
31
  import styles from './styles';
32
32
  import {HeaderType} from './types';
33
33
  import {InputSearchProps} from '../Input';
34
- import {HeaderExtendBackground} from '../Application/Components';
34
+ import {HeaderExtendHeader} from '../Application/Components';
35
35
 
36
36
  export interface ScreenProps extends ViewProps {
37
37
  /**
@@ -408,7 +408,7 @@ const Screen = forwardRef(
408
408
 
409
409
  return (
410
410
  <View style={[Styles.flex, {backgroundColor}]}>
411
- <HeaderExtendBackground
411
+ <HeaderExtendHeader
412
412
  headerType={headerType}
413
413
  heightHeader={heightHeader}
414
414
  animatedValue={animatedValue.current}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.21-beta.7",
3
+ "version": "0.92.21-beta.9",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},