SteffeyDev / react-native-popover-view

A well-tested, adaptable, lightweight <Popover> component for react-native
MIT License
613 stars 92 forks source link

More granular control to animations #166

Open araujobarret opened 1 year ago

araujobarret commented 1 year ago

Is your feature request related to a problem? Please describe. I want to be able to customize not only the animation duration, delay, etc, but the types of animations happening.

Describe the solution you'd like Or to pass some props to toggle which animations we use from the existing ones(with initial value also controlled via prop) or to pass custom animations and these could overwrite all animations happening in the component.

From these 2 ideas, I guess the easiest one is the first, if you think it's valid I can try submitting a PR next week but would like to hear from you if you approve, which solution is a quick win, etc.

SteffeyDev commented 1 year ago

Do you mean that you want, for example, the open animation to have a different animationConfig than the close animation?

araujobarret commented 1 year ago

Not animationConfig, I mean fade, scale and translate, in our case we loved the lib, simplified our popover but we bumped into the locked animations, for example only wanting to use fade 0 -> 1 and scale .9 -> 1

Not only in the animateOut but also animateIn in this case. ref

SteffeyDev commented 1 year ago

Got it, that makes sense. I'm not sure the best approach, but feel free to propose a PR with whatever method you find simplest and I will review.

araujobarret commented 1 year ago

Cool! Will work on it next week 👍

AdamGerthel commented 1 month ago

@araujobarret did you come up with anything?

araujobarret commented 1 month ago

Actually not, had to speed up other things and gave up on it 😓

AdamGerthel commented 1 month ago

It looks pretty straightforward. I'll see what I can do.