import React from 'react';
import { useTransition, animated } from 'react-spring';
export var FadeTransition = (_ref) => {
  var {
    fromStyles,
    toStyles,
    children
  } = _ref;
  var transitions = useTransition(children, null, {
    from: fromStyles,
    enter: toStyles,
    leave: fromStyles
  });
  return /*#__PURE__*/React.createElement(React.Fragment, null, transitions.map((_ref2) => {
    var {
      item,
      props,
      key
    } = _ref2;
    return item ? /*#__PURE__*/React.createElement(animated.div, {
      style: props,
      key: key
    }, children) : null;
  }));
};
//# sourceMappingURL=index.js.map