+
+
+
+ *
+ {this.bindings.i18n.t('required-fields')}
+
+
-
- ) : (
-
-
- )}
+
);
}
+ private renderSuccessFormFooter() {
+ return (
+
+
+
+
+
+ );
+ }
+
+ private renderFooter() {
+ if (!this.feedbackSubmitted) {
+ return this.renderFeedbackFormFooter();
+ } else {
+ return this.renderSuccessFormFooter();
+ }
+ }
+
public render() {
this.updateBreakpoints();
@@ -278,6 +435,7 @@ export class AtomicGeneratedAnswerFeedbackModal
isOpen={this.isOpen}
close={() => this.close()}
container={this.host}
+ part="generated-answer-feedback-modal"
exportparts="backdrop,container,header,header-wrapper,header-ruler,body,body-wrapper,footer,footer-wrapper,footer-wrapper"
>
{this.renderHeader()}
diff --git a/packages/atomic/src/components/common/generated-answer/generated-answer-common.tsx b/packages/atomic/src/components/common/generated-answer/generated-answer-common.tsx
index 167b6f3ca3d..5ab5b3b69a8 100644
--- a/packages/atomic/src/components/common/generated-answer/generated-answer-common.tsx
+++ b/packages/atomic/src/components/common/generated-answer/generated-answer-common.tsx
@@ -220,13 +220,8 @@ export class GeneratedAnswerCommon {
}
private renderFeedbackAndCopyButtons() {
- const {
- getGeneratedAnswerState,
- getBindings,
- getGeneratedAnswer,
- getCopied,
- getCopyError,
- } = this.props;
+ const {getGeneratedAnswerState, getBindings, getCopied, getCopyError} =
+ this.props;
const {i18n} = getBindings();
const {liked, disliked, answer, isStreaming} =
getGeneratedAnswerState() ?? {};
@@ -252,7 +247,7 @@ export class GeneratedAnswerCommon {
title={i18n.t('this-answer-was-helpful')}
variant="like"
active={!!liked}
- onClick={() => getGeneratedAnswer()?.like()}
+ onClick={() => this.clickLike()}
/>