noUnresolvedIssues.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import {Fragment} from 'react';
  2. import styled from '@emotion/styled';
  3. import zeroInboxIssuesImg from 'sentry-images/spot/zero-inbox-issues.svg';
  4. import {space} from 'sentry/styles/space';
  5. const Message = ({
  6. title,
  7. subtitle,
  8. }: {
  9. subtitle: React.ReactNode;
  10. title: React.ReactNode;
  11. }) => (
  12. <Fragment>
  13. <EmptyMessage>{title}</EmptyMessage>
  14. <p>{subtitle}</p>
  15. </Fragment>
  16. );
  17. type Props = {
  18. subtitle: React.ReactNode;
  19. title: React.ReactNode;
  20. };
  21. const NoUnresolvedIssues = ({title, subtitle}: Props) => (
  22. <Wrapper>
  23. <img src={zeroInboxIssuesImg} alt="No issues found spot illustration" />
  24. <Message title={title} subtitle={subtitle} />
  25. </Wrapper>
  26. );
  27. const Wrapper = styled('div')`
  28. display: flex;
  29. padding: ${space(4)} ${space(4)};
  30. flex-direction: column;
  31. align-items: center;
  32. text-align: center;
  33. color: ${p => p.theme.subText};
  34. @media (max-width: ${p => p.theme.breakpoints.small}) {
  35. font-size: ${p => p.theme.fontSizeMedium};
  36. }
  37. `;
  38. const EmptyMessage = styled('div')`
  39. font-weight: 600;
  40. @media (min-width: ${p => p.theme.breakpoints.small}) {
  41. font-size: ${p => p.theme.fontSizeExtraLarge};
  42. }
  43. `;
  44. export default NoUnresolvedIssues;