@momo-kits/carousel 0.92.16-beta.2 → 0.92.16-beta.4

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.
Files changed (3) hide show
  1. package/index.tsx +4 -3
  2. package/package.json +1 -1
  3. package/types.ts +1 -1
package/index.tsx CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  View,
11
11
  ViewStyle,
12
12
  } from 'react-native';
13
- import {defaultScrollInterpolator} from './animation';
13
+ import {defaultAnimatedStyles, defaultScrollInterpolator} from './animation';
14
14
  import {CarouselProps, CarouselRef, CarouselState, Position} from './types';
15
15
  import {scaleSize, Spacing} from '@momo-kits/foundation';
16
16
 
@@ -668,14 +668,15 @@ class Carousel extends React.PureComponent<CarouselProps, CarouselState> {
668
668
  if (full) {
669
669
  spacingStyle = {};
670
670
  }
671
+ const animatedStyle = defaultAnimatedStyles(animatedValue,this.props)
671
672
  return (
672
673
  <Component
673
674
  style={[
674
675
  mainDimension,
675
- slideStyle,
676
- // animatedStyle,
676
+ animatedStyle,
677
677
  {overflow: 'hidden'},
678
678
  spacingStyle,
679
+ slideStyle,
679
680
  ]}
680
681
  pointerEvents="box-none">
681
682
  {this.props.renderItem({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/carousel",
3
- "version": "0.92.16-beta.2",
3
+ "version": "0.92.16-beta.4",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {
package/types.ts CHANGED
@@ -18,7 +18,7 @@ export type CarouselProps = {
18
18
  loop?: boolean;
19
19
  loopClonesPerSide?: number;
20
20
  scrollEnabled?: boolean;
21
- slideStyle?: object;
21
+ slideStyle?: StyleProp<ViewStyle>;
22
22
  disableIntervalMomentum?: boolean;
23
23
  itemWidth?: number;
24
24
  data: any[];