Created
June 8, 2022 03:17
-
-
Save PrasathRavichandran/2c7b2526753cbcb5accd9e93c4c4d72e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; | |
... | |
const InputLengthStyles = useAnimatedStyle(() => | |
return { | |
width: withTiming(InputLength.value.width, { | |
duration: 250, | |
}), | |
}; | |
}); | |
const SearchTextPlacementStyles = useAnimatedStyle(() => { | |
return { | |
transform: [ | |
{ | |
translateX: withTiming(SearchTextPlacement.value.transformX, { | |
duration: 250, | |
}), | |
}, | |
], | |
}; | |
}); | |
const CancelBtnStyles = useAnimatedStyle(() => { | |
return { | |
transform: [ | |
{translateX: withTiming(CancelBtn.value.transformX, {duration: 250})}, | |
], | |
}; | |
}); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment