-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
.../observability_solution/apm/public/components/shared/entity_enablement/feedback_modal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { EuiButton, EuiConfirmModal } from '@elastic/eui'; | ||
|
||
export function FeedbackModal({ | ||
isFeedbackModalVisiable, | ||
setsIsFeedbackModalVisiable, | ||
refetch, | ||
}: { | ||
isFeedbackModalVisiable: boolean; | ||
setsIsFeedbackModalVisiable: (value: boolean) => void; | ||
refetch: () => void; | ||
}) { | ||
const closeModal = () => { | ||
setsIsFeedbackModalVisiable(false); | ||
refetch(); | ||
}; | ||
|
||
return ( | ||
<> | ||
{isFeedbackModalVisiable && ( | ||
<EuiConfirmModal | ||
title={i18n.translate('xpack.apm.eemFeedback.title', { | ||
defaultMessage: 'Thank you', | ||
})} | ||
onCancel={closeModal} | ||
onConfirm={closeModal} | ||
cancelButtonText={i18n.translate('xpack.apm.eemFeedback.button.cancel', { | ||
defaultMessage: 'Maybe later', | ||
})} | ||
confirmButtonText={ | ||
<EuiButton | ||
data-test-subj="xpack.apm.eemFeedback.button.open" | ||
fill | ||
iconType="discuss" | ||
size="s" | ||
href="https://ela.st/services-feedback" // FIXME update with the new one | ||
> | ||
{i18n.translate('xpack.apm.eemFeedback.button.openSurvey', { | ||
defaultMessage: 'Open survey', | ||
})} | ||
</EuiButton> | ||
} | ||
defaultFocusedButton="confirm" | ||
> | ||
<p> | ||
{i18n.translate('xpack.apm.feedbackModal.body.thanks', { | ||
defaultMessage: | ||
'Thank you for trying the new services experience. Check back often as we continue to update this page. ', | ||
})} | ||
</p> | ||
<p> | ||
{i18n.translate('xpack.apm.feedbackModal.body.feedback', { | ||
defaultMessage: | ||
'Have any feedback or ideas for improvement? Let us know in a short survey.', | ||
})} | ||
</p> | ||
</EuiConfirmModal> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters