From 12e703c02bd4f7289bf469f82b64cbe4ba41f58b Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Tue, 11 Nov 2025 03:59:58 -0800 Subject: [PATCH] feat: add scroll indicator button to scrollable container (#6803) Co-authored-by: Dhruwang --- .../general/formbricks-branding.tsx | 27 ++++++++++--------- .../components/icons/chevron-down-icon.tsx | 24 +++++++++++++++++ .../wrappers/scrollable-container.tsx | 13 ++++++++- .../src/components/wrappers/stacked-card.tsx | 2 +- 4 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 packages/surveys/src/components/icons/chevron-down-icon.tsx diff --git a/packages/surveys/src/components/general/formbricks-branding.tsx b/packages/surveys/src/components/general/formbricks-branding.tsx index d653cf6fdc..f97a199546 100644 --- a/packages/surveys/src/components/general/formbricks-branding.tsx +++ b/packages/surveys/src/components/general/formbricks-branding.tsx @@ -3,18 +3,19 @@ import { useTranslation } from "react-i18next"; export function FormbricksBranding() { const { t } = useTranslation(); return ( - -

- {t("common.powered_by")}{" "} - - Formbricks - -

-
+ + +

+ {t("common.powered_by")}{" "} + + Formbricks + +

+
+
); } diff --git a/packages/surveys/src/components/icons/chevron-down-icon.tsx b/packages/surveys/src/components/icons/chevron-down-icon.tsx new file mode 100644 index 0000000000..cfa32fe120 --- /dev/null +++ b/packages/surveys/src/components/icons/chevron-down-icon.tsx @@ -0,0 +1,24 @@ +interface ChevronDownIconProps { + className?: string; +} + +export const ChevronDownIcon = ({ className }: ChevronDownIconProps) => { + return ( + + ); +}; diff --git a/packages/surveys/src/components/wrappers/scrollable-container.tsx b/packages/surveys/src/components/wrappers/scrollable-container.tsx index 4d64cf82bb..599c74c43c 100644 --- a/packages/surveys/src/components/wrappers/scrollable-container.tsx +++ b/packages/surveys/src/components/wrappers/scrollable-container.tsx @@ -1,6 +1,7 @@ import type { JSX, Ref } from "preact"; import { forwardRef } from "preact/compat"; import { useEffect, useImperativeHandle, useRef, useState } from "preact/hooks"; +import { ChevronDownIcon } from "@/components/icons/chevron-down-icon"; import { cn } from "@/lib/utils"; interface ScrollableContainerProps { @@ -85,7 +86,17 @@ export const ScrollableContainer = forwardRef {!isAtBottom && ( -
+ <> +
+ + )}
); diff --git a/packages/surveys/src/components/wrappers/stacked-card.tsx b/packages/surveys/src/components/wrappers/stacked-card.tsx index 43d04c35fc..ec2b291db8 100644 --- a/packages/surveys/src/components/wrappers/stacked-card.tsx +++ b/packages/surveys/src/components/wrappers/stacked-card.tsx @@ -111,7 +111,7 @@ export const StackedCard = ({ ...straightCardArrangementStyles, ...getBottomStyles(), }} - className="fb-pointer fb-rounded-custom fb-bg-survey-bg fb-absolute fb-inset-x-0 fb-backdrop-blur-md fb-transition-all fb-ease-in-out fb-overflow-hidden"> + className="fb-pointer fb-rounded-custom fb-bg-survey-bg fb-absolute fb-inset-x-0 fb-transition-all fb-ease-in-out fb-overflow-hidden">