diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2019-02-05 09:38:19 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-03-06 11:30:41 +0100 |
commit | 9bd42df0365a3c64161ac9283c62b4a9f422402d (patch) | |
tree | 0bf09e9422342aa91c949c62481841481aec48db /server/sonar-web/src/main/js/components/controls/SimpleModal.tsx | |
parent | 2847ce4e648a167335d675a3ba6e71b7b1b0f248 (diff) | |
download | sonarqube-9bd42df0365a3c64161ac9283c62b4a9f422402d.tar.gz sonarqube-9bd42df0365a3c64161ac9283c62b4a9f422402d.zip |
SONARCLOUD-379 Enable users sync on existing ALM bound organizations
* Display org sync advertisement block
* Add membersSync prop to organization type and update mock functions
* Extract RadioCard from CardPlan
* Allow to customize Modal through ConfirmButton
* Add user sync configuration modal
* Show help tooltip when user sync is activated
Diffstat (limited to 'server/sonar-web/src/main/js/components/controls/SimpleModal.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/SimpleModal.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/SimpleModal.tsx b/server/sonar-web/src/main/js/components/controls/SimpleModal.tsx index a8a1ba1fe2d..9870f0e6ec7 100644 --- a/server/sonar-web/src/main/js/components/controls/SimpleModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/SimpleModal.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Modal from './Modal'; +import Modal, { ModalProps } from './Modal'; export interface ChildrenProps { onCloseClick: (event?: React.SyntheticEvent<HTMLElement>) => void; @@ -27,7 +27,7 @@ export interface ChildrenProps { submitting: boolean; } -interface Props { +interface Props extends ModalProps { children: (props: ChildrenProps) => React.ReactNode; header: string; onClose: () => void; @@ -86,9 +86,10 @@ export default class SimpleModal extends React.Component<Props, State> { }; render() { + const { children, header, onClose, onSubmit, ...modalProps } = this.props; return ( - <Modal contentLabel={this.props.header} onRequestClose={this.props.onClose}> - {this.props.children({ + <Modal contentLabel={header} onRequestClose={onClose} {...modalProps}> + {children({ onCloseClick: this.handleCloseClick, onFormSubmit: this.handleFormSubmit, onSubmitClick: this.handleSubmitClick, |