-
Notifications
You must be signed in to change notification settings - Fork 55
/
index.d.ts
36 lines (31 loc) · 1.08 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
declare module 'react-lottie-player' {
import type {
AnimationConfig,
AnimationDirection,
AnimationEventCallback,
AnimationItem,
AnimationSegment,
RendererType
} from 'lottie-web'
export type LottieProps = React.PropsWithoutRef<React.DetailedHTMLProps<
React.HTMLAttributes<HTMLDivElement>,
HTMLDivElement
>> &
Partial<Pick<AnimationConfig<RendererType>, 'loop' | 'renderer' | 'rendererSettings' | 'audioFactory'>> & {
play?: boolean
goTo?: number
speed?: number
direction?: AnimationDirection
segments?: AnimationSegment | AnimationSegment[]
useSubframes?: boolean
onComplete?: AnimationEventCallback
onLoopComplete?: AnimationEventCallback
onEnterFrame?: AnimationEventCallback
onSegmentStart?: AnimationEventCallback
onLoad?: AnimationEventCallback
/** Lottie `AnimationItem` Instance */
ref?: React.Ref<AnimationItem | undefined>
} & ({ path?: string } | { animationData?: { ['default']: object } | object })
const Lottie: React.FC<LottieProps>
export default Lottie
}