import React from "react";
import { CSSTransition } from "react-transition-group";
import styled from "styled-components";
const duration = 150;
const ChildrenWrapper = styled.div `
  transition: ${props => `opacity ${props.timeout}ms ease-in-out`};

  &.transition-inout-enter {
    opacity: 0;
  }

  &.transition-inout-enter-active {
    opacity: 1;
  }

  &.transition-inout-exit {
    opacity: 1;
  }

  &.transition-inout-exit-active {
    opacity: 0;
  }
`;
const TransitionInOut = ({ children, in: inProp, timeout = duration, ...TransitionProps }) => (React.createElement(CSSTransition, { ...TransitionProps, in: inProp, timeout: timeout, classNames: "transition-inout" },
    React.createElement(ChildrenWrapper, { timeout: timeout }, children)));
export default TransitionInOut;
//# sourceMappingURL=TransitionInOut.js.map