import styled from '@emotion/styled'; import {motion} from 'framer-motion'; import testableTransition from 'sentry/utils/testableTransition'; const Light = styled(motion.g)` transform-box: fill-box; `; Light.defaultProps = { initial: { originX: '50%', originY: '0', }, animate: { rotate: [-5, 8, -5], transition: testableTransition({ duration: 3, repeat: Infinity, repeatType: 'loop', }), }, }; function WelcomeBackground() { return ( ); } export default WelcomeBackground; const Illustration = styled(motion.svg)` position: absolute; /* Important is needed to override our root SVG rule. * We disable clipping to allow some of the background * to animate outside of the illustration during transitions */ overflow: visible !important; `; const Compass = styled(Illustration)` left: 24px; top: 32px; `; Compass.defaultProps = { variants: { initial: { opacity: 0, scale: 0.9, }, animate: { opacity: 1, scale: 1, transition: testableTransition({duration: 0.5}), }, exit: {y: -120, opacity: 0}, }, transition: testableTransition({ duration: 0.9, }), }; const Log = styled(Illustration)` right: -60px; bottom: 0; `; Log.defaultProps = { variants: { initial: { opacity: 0, scale: 0.9, }, animate: { opacity: 1, scale: 1, transition: testableTransition({duration: 0.5}), }, exit: {y: -200, opacity: 0}, }, transition: testableTransition({ duration: 1.1, }), }; const Container = styled(motion.div)` pointer-events: none; position: absolute; height: 150%; max-width: 100vw; width: 300%; top: -25%; @media (max-width: ${p => p.theme.breakpoints.small}) { display: none; } `; Container.defaultProps = { variants: { animate: {}, exit: {}, }, transition: testableTransition({staggerChildren: 0.2}), };