noEvents.tsx 662 B

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