Fix: Framer motion type error in sidebar
Fixes a type error related to `onAnimationStart` in `MobileSidebar` component.
This commit is contained in:
parent
771f0af1cb
commit
31cff64a24
@ -85,6 +85,10 @@ export const DesktopSidebar = ({
|
|||||||
...props
|
...props
|
||||||
}: React.ComponentProps<"div">) => {
|
}: React.ComponentProps<"div">) => {
|
||||||
const { open, setOpen, animate } = useSidebar();
|
const { open, setOpen, animate } = useSidebar();
|
||||||
|
|
||||||
|
// Separate motion-specific props from HTML div props
|
||||||
|
const { onAnimationStart, onAnimationComplete, ...htmlProps } = props as any;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<motion.div
|
<motion.div
|
||||||
@ -97,7 +101,7 @@ export const DesktopSidebar = ({
|
|||||||
}}
|
}}
|
||||||
onMouseEnter={() => setOpen(true)}
|
onMouseEnter={() => setOpen(true)}
|
||||||
onMouseLeave={() => setOpen(false)}
|
onMouseLeave={() => setOpen(false)}
|
||||||
{...props}
|
{...htmlProps}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user