diff --git a/src/common/SlideAnimationView.js b/src/common/SlideAnimationView.js deleted file mode 100644 index 32b2c25f03d..00000000000 --- a/src/common/SlideAnimationView.js +++ /dev/null @@ -1,55 +0,0 @@ -/* @flow strict-local */ -import React, { PureComponent } from 'react'; -import { Animated } from 'react-native'; - -import type { Node as React$Node } from 'react'; -import type { Style } from '../types'; - -type Props = $ReadOnly<{| - style: Style, - children: React$Node, - from: number, - to: number, - property: string, - movement: 'in' | 'out', - duration: number, - easing?: (value: number) => number, -|}>; - -type State = {| - animationIndex: Animated.Value, -|}; - -export default class SlideAnimationView extends PureComponent { - state = { - animationIndex: new Animated.Value(0), - }; - - static defaultProps = { - duration: 300, - movement: 'out', - }; - - animate() { - const { easing, duration } = this.props; - this.state.animationIndex.setValue(0); - Animated.timing(this.state.animationIndex, { - toValue: 1, - duration, - easing, - useNativeDriver: true, - }).start(); - } - - render() { - this.animate(); - const { property, from, to, movement, style } = this.props; - const animationValue = this.state.animationIndex.interpolate({ - inputRange: [0, 1], - outputRange: ((movement === 'out' ? [from, to] : [to, from]): number[]), - }); - - const slideStyle = { transform: [{ [property]: animationValue }] }; - return {this.props.children}; - } -} diff --git a/src/common/index.js b/src/common/index.js index 4142e960730..24e27c67149 100644 --- a/src/common/index.js +++ b/src/common/index.js @@ -29,7 +29,6 @@ export { default as SearchInput } from './SearchInput'; export { default as SectionHeader } from './SectionHeader'; export { default as SectionSeparator } from './SectionSeparator'; export { default as SectionSeparatorBetween } from './SectionSeparatorBetween'; -export { default as SlideAnimationView } from './SlideAnimationView'; export { default as SmartUrlInput } from './SmartUrlInput'; export { default as SpinningProgress } from './SpinningProgress'; export { default as GroupAvatar } from './GroupAvatar';