From 74eecb4ba1ee7ddb095b11629178f12c6376d5cb Mon Sep 17 00:00:00 2001 From: Maifee Ul Asad Date: Mon, 2 Dec 2024 01:29:33 +0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20style:=20added=20tooltip=20text=20f?= =?UTF-8?q?or=20external=20link=20(#332)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ChatItem/components/MessageContent.tsx | 51 +++++----------------- 1 file changed, 10 insertions(+), 41 deletions(-) diff --git a/src/ChatItem/components/MessageContent.tsx b/src/ChatItem/components/MessageContent.tsx index 39bd476..57af63c 100644 --- a/src/ChatItem/components/MessageContent.tsx +++ b/src/ChatItem/components/MessageContent.tsx @@ -4,7 +4,7 @@ import { Flexbox } from 'react-layout-kit'; import { ChatItemProps } from '@/ChatItem'; import EditableMessage from '@/EditableMessage'; -import { Card, ConfigProvider, List } from 'antd'; +import { Card, ConfigProvider, List, Tooltip } from 'antd'; import { MarkdownProps } from '@ant-design/pro-editor'; import { useStyles } from '../style'; @@ -21,13 +21,15 @@ const ExternalLink: React.FC = ({ url }) => { }; return ( - + + + ); }; @@ -67,39 +69,6 @@ const MessageContent = memo( }) => { const { cx, styles } = useStyles({ editing, placement, primary, type }); const { mobile } = useResponsive(); - // const references = [ - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'a' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bc' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bd' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // { url: 'https://www.a.com', description: 'lots of meawww', title: 'bb' }, - // { url: 'https://www.b.com', title: 'bb' }, - // { url: 'http://woof.com', description: 'ghew ghew', title: 'dog' }, - // ]; - const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const prefixClass = getPrefixCls('pro-chat');