import { keyframes, css } from "styled-components";

const PulseAnimation = keyframes`
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0.75;
  }
  50% {
    opacity: 0.5;
  }
  75% {
    opacity : 0.75;
  }
  100% {
    opacity: 1;
  }
`;

export const Animation = css`
  animation: ${props =>
    props.animation
      ? css`
          ${PulseAnimation} 1.5s ease-in-out 0.5s infinite
        `
      : ""};
`;
