@wix/design-system
Version:
@wix/design-system
24 lines • 1.15 kB
TypeScript
import * as React from 'react';
import { CHILD_SIZE } from './BounceAnimation.constants';
import type { ValuesOf } from '../utils/typeUtils';
export interface BounceAnimationProps {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook?: string;
/** The component which we would like to animate. */
children: React.ReactNode;
/** Triggers the animation transition */
active?: boolean;
/** A callback fired immediately after the animation starts. */
onStart?: (event: React.AnimationEvent<HTMLDivElement>) => void;
/** A callback fired immediately after the animation ends. */
onEnd?: (event: React.AnimationEvent<HTMLDivElement>) => void;
/** when set to true, the child component animate repetitively until stopped by other event*/
loop?: boolean;
/** set a delay before the animation execution. When provided a number- sets this as `ms`.*/
delay?: string | number;
}
export type BounceAnimationSize = ValuesOf<typeof CHILD_SIZE>;
export interface BounceAnimationState {
animationSize?: BounceAnimationSize;
}
//# sourceMappingURL=BounceAnimation.types.d.ts.map