aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx
diff options
context:
space:
mode:
authorPascal Mugnier <pascal.mugnier@sonarsource.com>2018-05-23 09:18:38 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-24 20:20:46 +0200
commita5484f56ceb467e5c0a2e3f705969c1822ea8109 (patch)
tree640afb7718cfc908551750580c71d7e5d52aa523 /server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx
parentb09719d9242ddc9de16e2cf428cebaacf7b485c5 (diff)
downloadsonarqube-a5484f56ceb467e5c0a2e3f705969c1822ea8109.tar.gz
sonarqube-a5484f56ceb467e5c0a2e3f705969c1822ea8109.zip
Fix after review
Diffstat (limited to 'server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx')
-rw-r--r--server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx
index 631d0743d89..6456e5a790c 100644
--- a/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx
+++ b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx
@@ -23,18 +23,18 @@ import DeferredSpinner from '../common/DeferredSpinner';
import { translate } from '../../helpers/l10n';
import { SubmitButton, ResetButtonLink } from '../ui/buttons';
-interface Props {
+interface Props<T> {
children: React.ReactNode;
confirmButtonText: string;
- confirmData?: string;
+ confirmData?: T;
confirmDisable?: boolean;
header: string;
isDestructive?: boolean;
onClose: () => void;
- onConfirm: (data?: string) => void | Promise<void>;
+ onConfirm: (data?: T) => void | Promise<void>;
}
-export default class ConfirmModal extends React.PureComponent<Props> {
+export default class ConfirmModal<T = string> extends React.PureComponent<Props<T>> {
mounted = false;
componentDidMount() {