aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/constants
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/@next/constants')
-rw-r--r--packages/website/ts/@next/constants/animations.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/website/ts/@next/constants/animations.tsx b/packages/website/ts/@next/constants/animations.tsx
index aed6ffec7..6a58c4b40 100644
--- a/packages/website/ts/@next/constants/animations.tsx
+++ b/packages/website/ts/@next/constants/animations.tsx
@@ -1,4 +1,4 @@
-import { keyframes } from 'styled-components';
+import { css, keyframes } from 'styled-components';
export const fadeIn = keyframes`
0% {
@@ -10,3 +10,9 @@ export const fadeIn = keyframes`
opacity: 1;
}
`;
+
+export const addFadeInAnimation = (duration: string = '0.5s', delay: string = '0s') => css`
+ opacity: 0;
+ transform: translateY(10px);
+ animation: ${fadeIn} ${duration} ${delay} forwards;
+`;