Open CRBroughton opened 4 days ago
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
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.
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) - https://github.com/motiondivision/motion/issues/2870
I've exported both the
DynamicAnimationOptions
andDOMKeyframesDefinition
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.