diffModal.tsx 769 B

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