Revert "feat: copy messages on hoverable icon (#1492)" (#1508)

This commit is contained in:
Alex Hancock
2025-03-04 14:08:01 -05:00
committed by GitHub
parent 48838c91c4
commit 7b767abfe6
5 changed files with 25 additions and 59 deletions
+1 -7
View File
@@ -3,7 +3,6 @@ import LinkPreview from './LinkPreview';
import { extractUrls } from '../utils/urlUtils';
import MarkdownContent from './MarkdownContent';
import { Message, getTextContent } from '../types/message';
import CopyButton from './ui/CopyButton';
interface UserMessageProps {
message: Message;
@@ -19,13 +18,8 @@ export default function UserMessage({ message }: UserMessageProps) {
return (
<div className="flex justify-end mt-[16px] w-full opacity-0 animate-[appear_150ms_ease-in_forwards]">
<div className="flex-col max-w-[85%]">
<div className="flex bg-slate text-white rounded-xl rounded-br-none py-2 px-3 mr-4 relative group">
<div className="flex bg-slate text-white rounded-xl rounded-br-none py-2 px-3">
<MarkdownContent content={textContent} className="text-white" />
<CopyButton
text={textContent}
className="absolute -bottom-2 -right-2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-md z-[1000] hover:bg-gray-100 dark:hover:bg-gray-700 opacity-0 group-hover:opacity-100 transition-opacity"
iconClassName="h-4 w-4 text-gray-800 dark:text-white"
/>
</div>
{/* TODO(alexhancock): Re-enable link previews once styled well again */}