Closed pedrokohler closed 2 years ago
Hey there ππ»
Sheet.Backdrop
is a motion.div
or motion.button
element (depending on whether you provide it the click/tap hander) which is why it exposes a bit different set of props than a regular div
or button
element. You can see the onTap
handler details in the Framer Motion docs.
I hope this helps π
Hey there. I don't understand how that solves my problem. I used the onClick property and typescript is still complaining as if this property does not exist. From what I got from your explanation, this shouldn't happen. Shouldn't it behave like a motion.button then in this case? Why is typescript still complaining?
Sorry if I was unclear. You need to use onTap
instead of onClick
since Framer Motion components don't have onClick
.
Typescript is complaining that onClick property does not exist when I try to use with the Sheet.Backdrop component.
Here's the full error
Here's the code snippet I'm using in my project
Maybe I'm just missing something here? I'd appreciate any help. Thanks