@momo-kits/template 0.80.8-beta.17 → 0.81.1-beta.1

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.
@@ -2,9 +2,9 @@ import React, {FC} from 'react';
2
2
  import {Animated, TouchableOpacity} from 'react-native';
3
3
  import Carousel from '@momo-kits/carousel';
4
4
  import {Image, Pagination, Spacing} from '@momo-kits/foundation';
5
- import {HeaderBannerProps} from './types';
5
+ import {HeaderSliderBannerProps} from './types';
6
6
 
7
- const HeaderBanner: FC<HeaderBannerProps> = ({
7
+ const HeaderSliderBanner: FC<HeaderSliderBannerProps> = ({
8
8
  animatedValue = new Animated.Value(0),
9
9
  paginationBottom = 56,
10
10
  data = [],
@@ -13,6 +13,7 @@ const HeaderBanner: FC<HeaderBannerProps> = ({
13
13
  carouselProps,
14
14
  onSnapToItem,
15
15
  onPressItem,
16
+ paginationType = 'black_white',
16
17
  }) => {
17
18
  const scale = animatedValue.interpolate({
18
19
  inputRange: [-300, 0, 300],
@@ -47,7 +48,8 @@ const HeaderBanner: FC<HeaderBannerProps> = ({
47
48
  return (
48
49
  <Animated.View
49
50
  style={{
50
- aspectRatio: 1.75,
51
+ height: 210,
52
+ // aspectRatio: 1.75,
51
53
  opacity: opacity,
52
54
  transform: [{scale}, {translateY}],
53
55
  }}>
@@ -63,15 +65,15 @@ const HeaderBanner: FC<HeaderBannerProps> = ({
63
65
  {...paginationProps}
64
66
  style={{
65
67
  position: 'absolute',
66
- bottom: paginationBottom + Spacing.XS,
68
+ bottom: paginationBottom - Spacing.S,
67
69
  alignSelf: 'center',
68
70
  }}
69
71
  activeIndex={activeIndex}
70
72
  dataLength={data.length}
71
- type={'black_white'}
73
+ type={paginationType}
72
74
  />
73
75
  </Animated.View>
74
76
  );
75
77
  };
76
78
 
77
- export default HeaderBanner;
79
+ export default HeaderSliderBanner;
@@ -3,7 +3,7 @@ import {CarouselProps} from '@momo-kits/carousel';
3
3
  import {Animated} from 'react-native';
4
4
  import AnimatedValue = Animated.AnimatedValue;
5
5
 
6
- export type HeaderBannerProps = {
6
+ export type HeaderSliderBannerProps = {
7
7
  animatedValue: AnimatedValue;
8
8
  data: string[];
9
9
  onSnapToItem: (index: number) => void;
@@ -12,4 +12,5 @@ export type HeaderBannerProps = {
12
12
  carouselProps?: CarouselProps;
13
13
  paginationBottom?: 8 | 24 | 56;
14
14
  onPressItem?: () => void;
15
+ paginationType: 'black_white' | 'number';
15
16
  };
package/index.tsx CHANGED
@@ -1,3 +1,3 @@
1
- import HeaderBanner from './HeaderBanner';
1
+ import HeaderSliderBanner from './HeaderSliderBanner';
2
2
 
3
- export {HeaderBanner};
3
+ export {HeaderSliderBanner};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/template",
3
- "version": "0.80.8-beta.17",
3
+ "version": "0.81.1-beta.1",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "dependencies": {},