refactor(chat): replace TooltipIconButton with Button for scroll functionality

This commit is contained in:
Anish Sarkar 2026-05-22 17:46:35 +05:30
parent 87a4dcfd05
commit 0fe2bba5a8

View file

@ -3,16 +3,19 @@
import { ThreadPrimitive } from "@assistant-ui/react"; import { ThreadPrimitive } from "@assistant-ui/react";
import { ArrowDownIcon } from "lucide-react"; import { ArrowDownIcon } from "lucide-react";
import type { FC, ReactNode } from "react"; import type { FC, ReactNode } from "react";
import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button"; import { Button } from "@/components/ui/button";
const ChatScrollToBottom: FC = () => ( const ChatScrollToBottom: FC = () => (
<ThreadPrimitive.ScrollToBottom asChild> <ThreadPrimitive.ScrollToBottom asChild>
<TooltipIconButton <Button
tooltip="Scroll to bottom" type="button"
className="aui-thread-scroll-to-bottom -top-12 absolute z-10 self-center rounded-full border-0 bg-muted p-4 text-foreground hover:bg-accent hover:text-accent-foreground disabled:invisible" variant="ghost"
size="icon"
aria-label="Scroll to bottom"
className="aui-thread-scroll-to-bottom -top-12 absolute z-10 size-10 self-center rounded-full border border-input bg-muted p-0 text-foreground shadow-sm shadow-black/5 hover:bg-accent hover:text-accent-foreground disabled:invisible dark:shadow-black/10"
> >
<ArrowDownIcon /> <ArrowDownIcon />
</TooltipIconButton> </Button>
</ThreadPrimitive.ScrollToBottom> </ThreadPrimitive.ScrollToBottom>
); );