UNPKG

@wix/design-system

Version:

@wix/design-system

19 lines 806 B
import * as React from 'react'; /** Animate Component */ const getDelayValue = (delay) => { switch (typeof delay) { case 'string': return delay; case 'number': return `${delay}ms`; default: return undefined; } }; const Animate = React.forwardRef(({ dataHook, animateClasses, delay, onStart, onEnd, children, animateInlineStyle, } = { children: undefined }, ref) => (React.createElement("div", { "data-hook": dataHook, className: animateClasses, style: { animationDelay: getDelayValue(delay), ...animateInlineStyle, }, onAnimationStart: onStart, onAnimationEnd: onEnd, ref: ref }, children && React.Children.only(children)))); Animate.displayName = 'Animate'; export default Animate; //# sourceMappingURL=Animate.js.map