From 51def6ee6b66ecb2c1dc2a8c0d74a79a4264dfc0 Mon Sep 17 00:00:00 2001 From: Ezekiel Aquino Date: Fri, 14 Dec 2018 15:27:47 +0100 Subject: Adds mask to get in touch anim --- .../ts/@next/components/animatedChatIcon.tsx | 52 ++++++++++++++-------- packages/website/ts/@next/components/hero.tsx | 2 +- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/packages/website/ts/@next/components/animatedChatIcon.tsx b/packages/website/ts/@next/components/animatedChatIcon.tsx index 5e46497fd..bddb1d433 100644 --- a/packages/website/ts/@next/components/animatedChatIcon.tsx +++ b/packages/website/ts/@next/components/animatedChatIcon.tsx @@ -3,41 +3,52 @@ import styled, { keyframes } from 'styled-components'; export const AnimatedChatIcon = () => ( - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + ); const scale = keyframes` 0% { transform: scale(1.2) } - 20% { transform: scale(1) } - 80% { transform: scale(1) } + 10% { transform: scale(1) } + 90% { transform: scale(1) } 100% { transform: scale(1.2) } `; const fadeInOut = keyframes` - 0%, 50%, 70%, 100% { + 0%, 30%, 50%, 100% { transform: initial; } - 60% { + 40% { transform: translateY(-5px); } `; const Bubble = styled.g` - animation: ${scale} 5s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275); + animation: ${scale} 4s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: 50% 50%; path, @@ -46,6 +57,11 @@ const Bubble = styled.g` } `; +const Rays = styled.g` + animation: ${scale} 4s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275); + transform-origin: 50% 50%; +`; + const Dot = styled.circle<{ delay: number }>` - animation: ${fadeInOut} 5s ${props => `${props.delay}s`} infinite; + animation: ${fadeInOut} 4s ${props => `${props.delay}s`} infinite; `; diff --git a/packages/website/ts/@next/components/hero.tsx b/packages/website/ts/@next/components/hero.tsx index 34f33d641..62008d53e 100644 --- a/packages/website/ts/@next/components/hero.tsx +++ b/packages/website/ts/@next/components/hero.tsx @@ -13,7 +13,7 @@ interface Props { } export const Hero = (props: Props) => ( -
+
{props.figure && -- cgit v1.2.3