Animation.ts 491 B

1234567891011121314151617
  1. import { fadeInVertical } from "../helpers/animations";
  2. import { Flex } from "rebass/styled-components";
  3. import styled from "styled-components";
  4. import { prop } from "styled-tools";
  5. import { FC } from "react";
  6. interface Props extends React.ComponentProps<typeof Flex> {
  7. offset: string;
  8. duration?: string;
  9. }
  10. const Animation: FC<Props> = styled(Flex)<Props>`
  11. animation: ${(props) => fadeInVertical(props.offset)}
  12. ${prop("duration", "0.3s")} ease-out;
  13. `;
  14. export default Animation;