replace with reanimated in collapsibleCard

This commit is contained in:
Sadaqat Ali 2022-09-27 20:42:30 +05:00
parent 1125ab99bc
commit 68e942ac88

View File

@ -1,5 +1,6 @@
import React, { PureComponent } from 'react';
import { View, TouchableHighlight, Animated } from 'react-native';
import { View, TouchableHighlight } from 'react-native';
import Animated, { Easing } from 'react-native-reanimated';
// Constants
@ -50,7 +51,7 @@ class CollapsibleCardView extends PureComponent {
Animated.timing(this.anime.height, {
toValue: this.anime.expanded ? this._getMinValue() : this._getMaxValue() + (moreHeight || 0),
duration: 200,
useNativeDriver: false,
easing: Easing.inOut(Easing.ease),
}).start();
this.anime.expanded = !this.anime.expanded;