UNPKG

@atlaskit/motion

Version:

A set of utilities to apply motion in your application.

31 lines 950 B
import React from 'react'; import KeyframesMotion from './keyframes-motion'; /** * __SlideIn__ * * Will slide an element into position, generally used for things that appear from outside of the viewport into view. * * See [examples](https://atlaskit.atlassian.com/packages/design-system/motion/docs/entering-motions). */ const SlideIn = ({ children, enterFrom, exitTo, fade = 'none', duration = 'medium', isPaused, onFinish, animationTimingFunction = 'ease-out', animationTimingFunctionExiting = 'ease-in' }) => { return /*#__PURE__*/React.createElement(KeyframesMotion, { duration: duration, enteringAnimation: `slide-in-from-${enterFrom}`, exitingAnimation: `slide-out-from-${exitTo || enterFrom}`, animationTimingFunction: animationTimingFunction, animationTimingFunctionExiting: animationTimingFunctionExiting, isPaused: isPaused, onFinish: onFinish }, children); }; export default SlideIn;