noEvents.tsx 644 B

123456789101112131415161718192021222324252627282930313233
  1. import styled from '@emotion/styled';
  2. import {t} from 'sentry/locale';
  3. type Props = {
  4. seriesCount: number;
  5. };
  6. const NoEvents = ({seriesCount}: Props) => (
  7. <Container>
  8. <EmptyText seriesCount={seriesCount}>{t('No activity yet.')}</EmptyText>
  9. </Container>
  10. );
  11. export default NoEvents;
  12. const Container = styled('div')`
  13. position: absolute;
  14. top: 0;
  15. left: 0;
  16. bottom: 0;
  17. right: 0;
  18. `;
  19. const EmptyText = styled('div')<Props>`
  20. display: flex;
  21. align-items: center;
  22. justify-content: center;
  23. margin-left: 4px;
  24. margin-right: 4px;
  25. height: ${p => (p.seriesCount > 1 ? '90px' : '150px')};
  26. color: ${p => p.theme.gray300};
  27. `;