Skip to content

Commit fe1e7d3

Browse files
milispclaude
andcommitted
fix: add dark mode support to text selection menu
Updates text selection menu styling to support dark theme with proper background colors and border styles for improved visibility in both light and dark modes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 413d091 commit fe1e7d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/chat/TextSelectionMenu.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const TextSelectionMenu: React.FC<TextSelectionMenuProps> = () => {
112112
pointerEvents: 'auto'
113113
}}
114114
>
115-
<div className="bg-white rounded-lg shadow-lg border border-gray-200 p-1 flex items-center gap-1">
115+
<div className="bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 p-1 flex items-center gap-1">
116116
<Button
117117
variant="ghost"
118118
size="sm"
@@ -123,7 +123,7 @@ export const TextSelectionMenu: React.FC<TextSelectionMenuProps> = () => {
123123
Copy
124124
</Button>
125125

126-
<div className="w-px h-4 bg-gray-300" />
126+
<div className="w-px h-4 bg-gray-300 dark:bg-gray-600" />
127127

128128
<Popover open={isOpen} onOpenChange={setIsOpen}>
129129
<PopoverTrigger asChild>
@@ -195,8 +195,8 @@ export const TextSelectionMenu: React.FC<TextSelectionMenuProps> = () => {
195195

196196
{/* Arrow pointing down to selection */}
197197
<div className="absolute top-full left-1/2 transform -translate-x-1/2">
198-
<div className="w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-gray-200"></div>
199-
<div className="w-0 h-0 border-l-3 border-r-3 border-t-3 border-l-transparent border-r-transparent border-t-white absolute top-0 left-1/2 transform -translate-x-1/2 -translate-y-px"></div>
198+
<div className="w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-gray-200 dark:border-t-gray-700"></div>
199+
<div className="w-0 h-0 border-l-3 border-r-3 border-t-3 border-l-transparent border-r-transparent border-t-white dark:border-t-gray-800 absolute top-0 left-1/2 transform -translate-x-1/2 -translate-y-px"></div>
200200
</div>
201201
</div>
202202
);

0 commit comments

Comments
 (0)