diff --git a/packages/surveys/src/components/buttons/back-button.tsx b/packages/surveys/src/components/buttons/back-button.tsx index b3917ad124..af0f74d863 100644 --- a/packages/surveys/src/components/buttons/back-button.tsx +++ b/packages/surveys/src/components/buttons/back-button.tsx @@ -16,7 +16,7 @@ export function BackButton({ onClick, backButtonLabel, tabIndex = 2 }: BackButto "fb-border-back-button-border fb-text-heading focus:fb-ring-focus fb-rounded-custom fb-flex fb-items-center fb-border fb-px-3 fb-py-3 fb-text-base fb-font-medium fb-leading-4 fb-shadow-sm hover:fb-opacity-90 focus:fb-outline-none focus:fb-ring-2 focus:fb-ring-offset-2" )} onClick={onClick}> - {backButtonLabel ?? "Back"} + {backButtonLabel || "Back"} ); } diff --git a/packages/surveys/src/components/buttons/submit-button.tsx b/packages/surveys/src/components/buttons/submit-button.tsx index 33905cac85..bf8b522670 100644 --- a/packages/surveys/src/components/buttons/submit-button.tsx +++ b/packages/surveys/src/components/buttons/submit-button.tsx @@ -2,7 +2,7 @@ import { ButtonHTMLAttributes, useRef } from "preact/compat"; import { useCallback, useEffect } from "preact/hooks"; interface SubmitButtonProps extends ButtonHTMLAttributes { - buttonLabel: string | undefined; + buttonLabel?: string; isLastQuestion: boolean; focus?: boolean; } @@ -56,7 +56,7 @@ export function SubmitButton({ className="fb-bg-brand fb-border-submit-button-border fb-text-on-brand focus:fb-ring-focus fb-rounded-custom fb-flex fb-items-center fb-border fb-px-3 fb-py-3 fb-text-base fb-font-medium fb-leading-4 fb-shadow-sm hover:fb-opacity-90 focus:fb-outline-none focus:fb-ring-2 focus:fb-ring-offset-2" onClick={onClick} disabled={disabled}> - {buttonLabel ?? (isLastQuestion ? "Finish" : "Next")} + {buttonLabel || (isLastQuestion ? "Finish" : "Next")} ); }