@amaui/ui-react
Version:
UI for React
33 lines (32 loc) • 1.11 kB
TypeScript
import React from 'react';
import { TTransitionsDurationProperties } from '@amaui/style-react';
import { IBaseElement, IRef } from '../types';
export type TKeyframesStatus = 'appended' | 'add' | 'adding' | 'added' | 'removed';
export interface IKeyframe {
name: string;
timeout: number;
}
export interface IKeyframes extends 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;