import React from 'react'; import {SCREEN_HEIGHT} from '../../utils'; import {View, StyleSheet, ViewProps} from 'react-native'; import Animated, { Value, interpolateColors, interpolate, } from 'react-native-reanimated'; interface SearchHeaderProps extends ViewProps { top: Value; } const SearchHeader: React.FC = ({top, style}) => { const color: Animated.Node = interpolateColors(top, { inputRange: [-SCREEN_HEIGHT, 0], outputColorRange: ['#fff', '#000'], }); const searchOpacity: Animated.Node = interpolate(top, { inputRange: [-SCREEN_HEIGHT, 0], outputRange: [0, 1], }); const exploreOpacity: Animated.Node = interpolate(top, { inputRange: [-SCREEN_HEIGHT, 0], outputRange: [1, 0], }); return ( Explore Search ); }; const styles = StyleSheet.create({ container: { flexDirection: 'row', justifyContent: 'center', height: 30, }, headerContainer: { position: 'absolute', left: '50%', }, header: { position: 'relative', right: '50%%', fontSize: 24, fontWeight: 'bold', }, }); export default SearchHeader;