2020-01-02 20:09:59 +03:30
|
|
|
import { fadeInVertical } from "../helpers/animations";
|
2022-11-25 19:24:05 +03:30
|
|
|
import { Flex } from "rebass/styled-components";
|
2020-01-02 20:09:59 +03:30
|
|
|
import styled from "styled-components";
|
|
|
|
import { prop } from "styled-tools";
|
|
|
|
import { FC } from "react";
|
|
|
|
|
|
|
|
interface Props extends React.ComponentProps<typeof Flex> {
|
|
|
|
offset: string;
|
|
|
|
duration?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Animation: FC<Props> = styled(Flex)<Props>`
|
2022-11-25 19:24:05 +03:30
|
|
|
animation: ${(props) => fadeInVertical(props.offset)}
|
2020-01-02 20:09:59 +03:30
|
|
|
${prop("duration", "0.3s")} ease-out;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default Animation;
|