setupIntroduction.tsx 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import styled from '@emotion/styled';
  2. import {motion} from 'framer-motion';
  3. import {PlatformIcon} from 'platformicons';
  4. import {PlatformKey} from 'sentry/data/platformCategories';
  5. import space from 'sentry/styles/space';
  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. <motion.div
  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. </motion.div>
  24. </TitleContainer>
  25. );
  26. }
  27. const TitleContainer = styled('div')`
  28. display: grid;
  29. grid-template-columns: max-content 1fr;
  30. gap: ${space(2)};
  31. align-items: center;
  32. justify-items: end;
  33. ${StepHeading} {
  34. margin-bottom: 0;
  35. }
  36. `;