kutt/client/components/Animation.ts
2022-11-29 20:27:45 +03:30

18 lines
491 B
TypeScript

import { fadeInVertical } from "../helpers/animations";
import { Flex } from "rebass/styled-components";
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>`
animation: ${(props) => fadeInVertical(props.offset)}
${prop("duration", "0.3s")} ease-out;
`;
export default Animation;