groupEventHeader.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import styled from '@emotion/styled';
  2. import {DataSection} from 'sentry/components/events/styles';
  3. import {space} from 'sentry/styles/space';
  4. import type {Event} from 'sentry/types/event';
  5. import type {Group} from 'sentry/types/group';
  6. import type {Project} from 'sentry/types/project';
  7. import {GroupEventCarousel} from 'sentry/views/issueDetails/groupEventCarousel';
  8. import {TraceTimeLineOrRelatedIssue} from './traceTimelineOrRelatedIssue';
  9. type GroupEventHeaderProps = {
  10. event: Event;
  11. group: Group;
  12. project: Project;
  13. };
  14. function GroupEventHeader({event, group, project}: GroupEventHeaderProps) {
  15. return (
  16. <StyledDataSection>
  17. <GroupEventCarousel group={group} event={event} projectSlug={project.slug} />
  18. <TraceTimeLineOrRelatedIssue event={event} />
  19. </StyledDataSection>
  20. );
  21. }
  22. const StyledDataSection = styled(DataSection)`
  23. padding: ${space(1)} ${space(2)} 0;
  24. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  25. padding: ${space(1.5)} ${space(4)} 0;
  26. }
  27. `;
  28. export default GroupEventHeader;