Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
lerte committed Nov 19, 2024
1 parent c15fd2e commit 5dcde4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/actify/src/components/Carousel/CarouselContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { AnimatePresence, motion } from 'framer-motion'
import React, { Children, isValidElement, useEffect } from 'react'

import clsx from 'clsx'
import { useCarousel } from './CarouselContext'
import { wrap } from 'popmotion'

Expand Down Expand Up @@ -52,11 +51,12 @@ const CarouselContent = ({ children }: React.ComponentProps<'div'>) => {
<AnimatePresence initial={false} custom={direction}>
{Children.map(children, (child, index) => {
if (isValidElement(child)) {
// @ts-expect-error
const MotionComponent = motion(child.type)
if (current == index) {
return (
<MotionComponent
// @ts-ignore
// @ts-expect-error
{...child.props}
style={{ position: 'absolute' }}
variants={variants}
Expand Down

0 comments on commit 5dcde4a

Please sign in to comment.