UNPKG

@atlaskit/motion

Version:

A set of utilities to apply motion in your application.

24 lines (23 loc) • 860 B
import _extends from "@babel/runtime/helpers/extends"; import React, { forwardRef } from 'react'; import IconMotionBase from './icon-motion-base'; import IconMotionRotate from './icon-motion-rotate'; /** * The base is wrapped so that the `xcss` it takes for effects such as `IconMotion.Rotate` isn't part * of the public props. */ const IconMotionPublic = /*#__PURE__*/forwardRef(function IconMotion(props, ref) { return /*#__PURE__*/React.createElement(IconMotionBase, _extends({}, props, { ref: ref })); }); /** * __IconMotion__ * * Animates an icon when it is swapped for a different one, using the `motion.iconography` tokens. * Effects that respond to an interaction are available as properties, such as `IconMotion.Rotate`. */ const IconMotion = Object.assign(IconMotionPublic, { Rotate: IconMotionRotate }); export default IconMotion;