replayOnboardingPanel.tsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import styled from '@emotion/styled';
  2. import emptyStateImg from 'sentry-images/spot/replays-empty-state.svg';
  3. import ButtonBar from 'sentry/components/buttonBar';
  4. import OnboardingPanel from 'sentry/components/onboardingPanel';
  5. import {t} from 'sentry/locale';
  6. interface Props {
  7. children?: React.ReactNode;
  8. }
  9. export default function ReplayOnboardingPanel(props: Props) {
  10. return (
  11. <OnboardingPanel image={<HeroImage src={emptyStateImg} />}>
  12. <h3>{t('Get to the root cause of errors faster.')}</h3>
  13. <p>
  14. {t(
  15. 'See a video-like reproduction of your user sessions so you can see what happened before, during, and after an error or latency issue occurred.'
  16. )}
  17. </p>
  18. <ButtonList gap={1}>{props.children}</ButtonList>
  19. </OnboardingPanel>
  20. );
  21. }
  22. const HeroImage = styled('img')`
  23. @media (min-width: ${p => p.theme.breakpoints.small}) {
  24. user-select: none;
  25. position: absolute;
  26. top: 0;
  27. bottom: 0;
  28. width: 220px;
  29. margin-top: auto;
  30. margin-bottom: auto;
  31. transform: translateX(-50%);
  32. left: 50%;
  33. }
  34. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  35. transform: translateX(-55%);
  36. width: 300px;
  37. min-width: 300px;
  38. }
  39. @media (min-width: ${p => p.theme.breakpoints.large}) {
  40. transform: translateX(-60%);
  41. width: 380px;
  42. min-width: 380px;
  43. }
  44. @media (min-width: ${p => p.theme.breakpoints.xlarge}) {
  45. transform: translateX(-65%);
  46. width: 420px;
  47. min-width: 420px;
  48. }
  49. `;
  50. const ButtonList = styled(ButtonBar)`
  51. grid-template-columns: repeat(auto-fit, minmax(130px, max-content));
  52. `;