Survey by ${posthogLogo}
@@ -741,7 +741,7 @@ export const callSurveys = (posthog: PostHog, forceReload: boolean = false) => {
})
}
const countdownEl = thankYouElement.querySelector('.thank-you-message-countdown')
- if (countdownEl) {
+ if (survey.appearance?.autoDisappear && countdownEl) {
let count = 3
countdownEl.textContent = `(${count})`
const countdown = setInterval(() => {
diff --git a/src/posthog-surveys-types.ts b/src/posthog-surveys-types.ts
index e5862f02b..30b122b9f 100644
--- a/src/posthog-surveys-types.ts
+++ b/src/posthog-surveys-types.ts
@@ -9,12 +9,14 @@ export interface SurveyAppearance {
backgroundColor?: string
submitButtonColor?: string
textColor?: string
+ // deprecate submit button text eventually
submitButtonText?: string
descriptionTextColor?: string
ratingButtonColor?: string
ratingButtonActiveColor?: string
ratingButtonHoverColor?: string
whiteLabel?: boolean
+ autoDisappear?: boolean
displayThankYouMessage?: boolean
thankYouMessageHeader?: string
thankYouMessageDescription?: string
@@ -37,6 +39,7 @@ interface SurveyQuestionBase {
question: string
description?: string | null
optional?: boolean
+ buttonText?: string
}
export interface BasicSurveyQuestion extends SurveyQuestionBase {