@onesy/ui-react
Version:
UI for React
33 lines (32 loc) • 1.12 kB
TypeScript
import React from 'react';
import { TTransitionsDurationProperties } from '@onesy/style-react';
import { IBaseElement, IRef } from '../types';
export declare type TKeyframesStatus = 'appended' | 'add' | 'adding' | 'added' | 'removed';
export declare type IKeyframe = {
name: string;
timeout: number;
};
export declare type IKeyframes = Omit<IBaseElement, 'className'> & {
ref?: IRef;
className?: boolean;
prefix?: string;
append?: boolean;
add?: boolean;
update?: boolean;
runOnEnter?: boolean;
removeOnEnd?: boolean;
appendStatusPost?: string;
keyframes?: Array<IKeyframe>;
timeout?: TTransitionsDurationProperties | number | {
default?: number;
add?: number;
};
onKeyframes?: (element: HTMLElement, status: TKeyframesStatus) => void;
onAppended?: (element: HTMLElement) => void;
onAdd?: (element: HTMLElement) => void;
onAdding?: (element: HTMLElement) => void;
onAdded?: (element: HTMLElement) => void;
onRemoved?: (element: HTMLElement) => void;
};
declare const Keyframes: React.FC<IKeyframes>;
export default Keyframes;