diffModal.tsx 743 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {css} from '@emotion/react';
  2. import {ModalRenderProps} from 'sentry/actionCreators/modal';
  3. import IssueDiff from 'sentry/components/issueDiff';
  4. type Props = ModalRenderProps & React.ComponentProps<typeof IssueDiff>;
  5. const DiffModal = ({className, Body, CloseButton, ...props}: Props) => (
  6. <Body>
  7. <CloseButton />
  8. <IssueDiff className={className} {...props} />
  9. </Body>
  10. );
  11. const modalCss = css`
  12. position: absolute;
  13. left: 20px;
  14. right: 20px;
  15. top: 20px;
  16. bottom: 20px;
  17. display: flex;
  18. padding: 0;
  19. width: auto;
  20. [role='document'] {
  21. overflow: scroll;
  22. height: 100%;
  23. display: flex;
  24. flex: 1;
  25. }
  26. section {
  27. display: flex;
  28. width: 100%;
  29. }
  30. `;
  31. export {modalCss};
  32. export default DiffModal;