+
+ { __(
+ 'Your feedback will help create a better experience for thousands of merchants like you. Please tell us to what extent you agree or disagree with the statements below.',
+ 'woocommerce'
+ ) }
+
+
- { label }
+ { firstQuestion }
+ onRadioControlChange(
+ value as string,
+ setFirstQuestionScore
+ )
+ }
/>
- { ( score === 1 || score === 2 ) && (
+
+ { secondQuestion }
+
+
+
+
+ onRadioControlChange(
+ value as string,
+ setSecondQuestionScore
+ )
+ }
+ />
+
+
+ { [ firstQuestionScore, secondQuestionScore ].some(
+ ( score ) => score === 1 || score === 2
+ ) && (
setComments( value ) }
rows={ 5 }
/>
@@ -153,7 +231,7 @@ function CustomerFeedbackModal( {
{ __( 'Cancel', 'woocommerce' ) }
@@ -162,7 +240,9 @@ function CustomerFeedbackModal( {
CustomerFeedbackModal.propTypes = {
recordScoreCallback: PropTypes.func.isRequired,
- label: PropTypes.string.isRequired,
+ title: PropTypes.string.isRequired,
+ firstQuestion: PropTypes.string.isRequired,
+ secondQuestion: PropTypes.string.isRequired,
defaultScore: PropTypes.number,
onCloseModal: PropTypes.func,
};
diff --git a/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx b/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx
index 40829821a4e..2604b415ee7 100644
--- a/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx
+++ b/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx
@@ -16,7 +16,9 @@ describe( 'CustomerFeedbackModal', () => {
render(