UNPKG

@wix/design-system

Version:

@wix/design-system

36 lines 1.53 kB
import * as React from 'react'; import { CHILD_SIZE } from './PulseAnimation.constants'; import type { ValuesOf } from '../utils/typeUtils'; export interface PulseAnimationProps { /** Applied as data-hook HTML attribute that can be used in the tests */ dataHook?: string; /** Node to animate (one child node) */ 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 * @default true */ loop?: boolean; /** Set a delay before the animation execution. When provided a number- sets this as `ms`. */ delay?: string | number; /** The color of the animation */ color: 'B10' | 'R10' | 'P10' | 'G10'; /** Sets the border-radius css property of the animation */ borderRadius?: React.CSSProperties['borderRadius']; /** * Changes fluidity from fit-content to 100% and allows children to stretch to its parent container width * @default false */ fluid?: boolean; } export type PulseAnimationSize = ValuesOf<typeof CHILD_SIZE>; export interface PulseAnimationState { animationSize?: PulseAnimationSize; } //# sourceMappingURL=PulseAnimation.types.d.ts.map