index.tsx 951 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import {Fragment} from 'react';
  2. import DetailsSplitDivider from 'sentry/components/replays/virtualizedGrid/detailsSplitDivider';
  3. import type {HydratedA11yFrame} from 'sentry/utils/replays/hydrateA11yFrame';
  4. import type {useResizableDrawer} from 'sentry/utils/useResizableDrawer';
  5. import AccessibilityDetailsContent from 'sentry/views/replays/detail/accessibility/details/content';
  6. type Props = {
  7. item: null | HydratedA11yFrame;
  8. onClose: () => void;
  9. } & Omit<ReturnType<typeof useResizableDrawer>, 'size'>;
  10. function AccessibilityDetails({
  11. isHeld,
  12. item,
  13. onClose,
  14. onDoubleClick,
  15. onMouseDown,
  16. }: Props) {
  17. if (!item) {
  18. return null;
  19. }
  20. return (
  21. <Fragment>
  22. <DetailsSplitDivider
  23. isHeld={isHeld}
  24. onClose={onClose}
  25. onDoubleClick={onDoubleClick}
  26. onMouseDown={onMouseDown}
  27. />
  28. <AccessibilityDetailsContent item={item} />
  29. </Fragment>
  30. );
  31. }
  32. export default AccessibilityDetails;