@lordicon/react
Version:
This library allows you to easily integrate the playback of Lordicon icons into a React application.
40 lines (39 loc) • 1.31 kB
TypeScript
import { ILottieProperty } from '@lordicon/helpers';
import { AnimationItem } from 'lottie-web';
import React from 'react';
import { IPlayer, IPlayerOptions, IState } from './interfaces';
type PlayerState = {};
type Options = IPlayerOptions;
export declare class Player extends React.Component<Options, PlayerState> implements IPlayer {
protected _ref?: React.RefObject<HTMLDivElement>;
protected _states: IState[];
protected _state?: IState;
protected _root?: ShadowRoot;
protected _iconData: any;
protected _properties: ILottieProperty[];
protected _lottie?: AnimationItem;
constructor(props: Options);
connect(): void;
disconnect(): void;
componentDidMount(): void;
componentWillUnmount(): void;
componentDidUpdate(prevProps: Options, prevState: PlayerState): void;
onFinish(): void;
onDirectionChanged(): void;
onStateChanged(): void;
onIconChanged(): void;
onReady(): void;
play(): void;
playFromBeginning(): void;
pause(): void;
goToFirstFrame(): void;
goToLastFrame(): void;
goToFrame(frame: number): void;
refresh(): void;
render(): import("react/jsx-runtime").JSX.Element;
get frames(): number;
get isPlaying(): boolean;
get states(): IState[];
get currentState(): IState;
}
export {};