software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.83k stars 1.29k forks source link

not able to assign percent values to width #1613

Closed bharat-tiwari closed 3 years ago

bharat-tiwari commented 3 years ago

Description

the way sometimes we set width of some elements in RN stylesheets as percent value - { width: '100%' }, this seem to be not supported in reanimated2 when used with typescript

Screenshots

1

2

Steps To Reproduce

as can be seen in above screenshot

Expected behavior

string values should be accepted for width prop type in useAnimation

Actual behavior

string values are not currently accepted for width prop type in useAnimation

Snack or minimal code example

Package versions

github-actions[bot] commented 3 years ago

Issue validator - update # 1

Hello! Congratulations! Your issue passed the validator! Thank you!

abumubaarak commented 2 months ago

@bharat-tiwari use the % inside the withTiming instead of the useSharedValue E.g

Screenshot 2024-06-15 at 18 42 55