From 892532dfa25813b0bbffddfc8e2393dd031efa0f Mon Sep 17 00:00:00 2001 From: t1enne Date: Fri, 30 Sep 2022 13:16:35 +0200 Subject: [PATCH] moved scroll to bottom btn to own comp --- .../chat/ChatContainer/ScrollToBotBtn.tsx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 web/components/chat/ChatContainer/ScrollToBotBtn.tsx diff --git a/web/components/chat/ChatContainer/ScrollToBotBtn.tsx b/web/components/chat/ChatContainer/ScrollToBotBtn.tsx new file mode 100644 index 000000000..ea72b7d5a --- /dev/null +++ b/web/components/chat/ChatContainer/ScrollToBotBtn.tsx @@ -0,0 +1,28 @@ +import { VerticalAlignBottomOutlined } from '@ant-design/icons'; +import { Button } from 'antd'; +import { FC, MutableRefObject } from 'react'; +import { ChatMessage } from '../../../interfaces/chat-message.model'; +import styles from './ChatContainer.module.scss'; + +type Props = { + chatContainerRef: MutableRefObject; + messages: ChatMessage[]; +}; + +export const ScrollToBotBtn: FC = ({ chatContainerRef, messages }) => ( +
+ +
+);