Skip to content

Instantly share code, notes, and snippets.

@PrasathRavichandran
Created June 8, 2022 03:19
Show Gist options
  • Save PrasathRavichandran/70b2836891a7a574fa20f994ecf90fc7 to your computer and use it in GitHub Desktop.
Save PrasathRavichandran/70b2836891a7a574fa20f994ecf90fc7 to your computer and use it in GitHub Desktop.
import Animated, { useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
...
return (
<View style={styles.searchTopContainer}>
{/* Added InputLengthStyles animated styles */}
<Animated.View style={[styles.searchContainer, InputLengthStyles]}>
{/* Added SearchTextPlacementStyles animated styles */}
<Animated.View style={[styles.search, SearchTextPlacementStyles]}>
<Icon name="search-outline" size={18} style={styles.searchIcon} />
{/* TextInput */}
<TextInput
placeholder={'Search'}
style={{fontSize: 16, paddingRight: 20}}
/>
</Animated.View>
</Animated.View>
{/* Cancel button */}
{/* Added CancelBtnStyles animated styles */}
<Animated.View style={[styles.cancelBtnContainer, CancelBtnStyles]}>
<TouchableOpacity onPress={() => {}}>
<Text>Cancel</Text>
</TouchableOpacity>
</Animated.View>
</View>
);
};
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment