editOwnershipRulesModal.tsx 933 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {Fragment} from 'react';
  2. import {css} from '@emotion/react';
  3. import {
  4. EditOwnershipRulesModalOptions,
  5. ModalRenderProps,
  6. } from 'sentry/actionCreators/modal';
  7. import {t} from 'sentry/locale';
  8. import theme from 'sentry/utils/theme';
  9. import {EditOwnershipRules} from 'sentry/views/settings/project/projectOwnership/editRulesModal';
  10. type Props = ModalRenderProps & EditOwnershipRulesModalOptions;
  11. function EditOwnershipRulesModal({Body, Header, onSave, closeModal, ...props}: Props) {
  12. return (
  13. <Fragment>
  14. <Header closeButton>
  15. <h4>{t('Edit Ownership Rules')}</h4>
  16. </Header>
  17. <Body>
  18. <EditOwnershipRules {...props} onSave={onSave} onCancel={closeModal} />
  19. </Body>
  20. </Fragment>
  21. );
  22. }
  23. export const modalCss = css`
  24. @media (min-width: ${theme.breakpoints.small}) {
  25. width: 80%;
  26. }
  27. [role='document'] {
  28. overflow: initial;
  29. }
  30. `;
  31. export default EditOwnershipRulesModal;