Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exports DynamicAnimationOptions and DOMKeyframesDefinition #2892

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CRBroughton
Copy link

@CRBroughton CRBroughton commented Nov 17, 2024

Hello there :) Saw a recent video on Motion (thanks Theo) and I've started playing around with it and realised for a Vue or any other framework wrapper, we'll probably need access to some of the underlying types that are currently only exposed via the React implementation.

There's also an open issue with this request (minus a type) - #2870

I've exported both the DynamicAnimationOptions and DOMKeyframesDefinition types to help enable this.

If there's anything else I need to do on this PR, please shout. I've run the build locally and all seems fine and my very basic implementation with Vue seems to work with the updated files.

@targetlucked69
Copy link

Hey nice PR! Would love to see MotionProps export too! Maybe create an internal one used by react that has children prop, but the default one doesnt have

@CRBroughton
Copy link
Author

CRBroughton commented Nov 18, 2024

Hey there :) I was going to suggest as a potential solution:

export type MotionPropsWithoutChildren = Omit<MotionProps, 'children'>

as the above is a one-liner and achieves what I imagine is needed to help use this type for other frameworks. Any thoughts on the above?

Edit: On second look, seems like the React types are a bit more embedded into that MotionProps type and will require a bit of effort (unknown) to unravel. Might be best to separate that out into another PR as I'm not familiar enough (yet) with the codebase to do that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants