You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No overload matches this call.
Overload 1 of 2, '(factory: MotiPressableInteractionProp, maybeDeps?: unknown[]): Pick<UseAnimationState<any>, "__state">', gave the following error.
Argument of type '({ pressed }: MotiPressableInteractionState) => { color: string; }' is not assignable to parameter of type 'MotiPressableInteractionProp'.
Type '{ color: string; }' is not assignable to type 'NonNullable<AnimateProp>'.
Overload 2 of 2, '(id: string, factory: MotiPressableInteractionProp, maybeDeps?: unknown[]): Pick<UseAnimationState<any>, "__state">', gave the following **error.**
Argument of type '({ pressed }: MotiPressableInteractionState) => { color: string; }' is not assignable to parameter of type 'string'.ts(2769)
The code works, the color is changed when it is pressed, but the TS error still persists. So the question here is:
Is there a reason for AnimateProp to be MotiAnimationProp<ViewStyle> instead of MotiAnimationProp<ViewStyle & TextStyle>?
For now I will be patching the package to get rid f the TS error, but I do not know the full repercussions os changing this (and if it is even intended)
Expected Behavior
The type should be changed to allow TextStyles to be updated as well
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
When using the useMotiPressable, I tried changing the color value of a MotiText based on the pressed state like this:
and I face the following TS error
The code works, the color is changed when it is pressed, but the TS error still persists. So the question here is:
For now I will be patching the package to get rid f the TS error, but I do not know the full repercussions os changing this (and if it is even intended)
Expected Behavior
The type should be changed to allow TextStyles to be updated as well
Steps To Reproduce
Versions
Screenshots
No response
Reproduction
The text was updated successfully, but these errors were encountered: