setupIntroduction.tsx 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import styled from '@emotion/styled';
  2. import {motion} from 'framer-motion';
  3. import {PlatformIcon} from 'platformicons';
  4. import {space} from 'sentry/styles/space';
  5. import type {PlatformKey} from 'sentry/types/project';
  6. import StepHeading from './stepHeading';
  7. type Props = {
  8. platform: PlatformKey;
  9. stepHeaderText: string;
  10. };
  11. export default function SetupIntroduction({stepHeaderText, platform}: Props) {
  12. return (
  13. <TitleContainer>
  14. <StepHeading step={2}>{stepHeaderText}</StepHeading>
  15. <IconWrapper
  16. variants={{
  17. initial: {opacity: 0, x: 20},
  18. animate: {opacity: 1, x: 0},
  19. exit: {opacity: 0},
  20. }}
  21. >
  22. <PlatformIcon size={48} format="lg" platform={platform} />
  23. </IconWrapper>
  24. </TitleContainer>
  25. );
  26. }
  27. const TitleContainer = styled('div')`
  28. display: flex;
  29. gap: ${space(2)};
  30. ${StepHeading} {
  31. margin-bottom: 0;
  32. min-width: 0;
  33. }
  34. `;
  35. const IconWrapper = styled(motion.div)`
  36. margin-left: auto;
  37. flex-shrink: 0;
  38. `;