Replies: 1 comment
-
If it helps someone, my workaround was to create a component using My component using const MotionDialogPanel = forwardRef<HTMLDivElement, any>((props, ref) => (
<motion.div
ref={ref}
initial={{ x: '20vw' }}
animate={{ x: 0 }}
exit={{ x: '20vw' }}
transition={{ type: 'spring', stiffness: 300, damping: 30 }}
className='max-w-lg space-y-4 h-full bg-tertiary rounded-l-xl p-2 text-primary'
{...props}
/>
)); And then the DialogPanel: If there is a better solution please lmk! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So im following the idea of using framer motion to animate the opening and closing of a dialog. But i found myself in a position where i want to use the framer motion, motion.div transition prop. But it overlaps with the DialogPanel transition prop.
Is there a way i can specify which of the transitions props I want to use?
And there is an error with the above code in the transition prop that states:
Type '{ type: string; stiffness: number; }' is not assignable to type 'boolean | undefined'.ts(2322)
that suggests it is using the DialogPanel transition prop.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions