diff options
author | Pascal Mugnier <pascal.mugnier@sonarsource.com> | 2018-05-23 09:18:38 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-05-24 20:20:46 +0200 |
commit | a5484f56ceb467e5c0a2e3f705969c1822ea8109 (patch) | |
tree | 640afb7718cfc908551750580c71d7e5d52aa523 /server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx | |
parent | b09719d9242ddc9de16e2cf428cebaacf7b485c5 (diff) | |
download | sonarqube-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.tsx | 8 |
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() { |