diff --git a/src/extensions/surveys.ts b/src/extensions/surveys.ts index 5d294e7b5..52f783be7 100644 --- a/src/extensions/surveys.ts +++ b/src/extensions/surveys.ts @@ -361,7 +361,7 @@ export const createOpenTextOrLinkPopup = (
Survey by ${posthogLogo} @@ -526,7 +526,7 @@ export const createRatingsPopup = (
Survey by ${posthogLogo} @@ -618,7 +618,7 @@ export const createMultipleChoicePopup = (
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 {