mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-27 19:25:15 +02:00
refactor(chat): replace TooltipIconButton with Button for scroll functionality
This commit is contained in:
parent
87a4dcfd05
commit
0fe2bba5a8
1 changed files with 8 additions and 5 deletions
|
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue