Skip to content

Commit

Permalink
Fix tooltip and hover text color for Export icon
Browse files Browse the repository at this point in the history
Fixes #409

Fix the blank tooltip for the Export icon and add hover text color changes for navigation icons.

* **Tooltip Fix:**
  - Set the tooltip content for the Export icon to "Export Chat" in `app/components/chat/ExportChatButton.tsx`.

* **Hover Text Color Change:**
  - Add CSS rule to change text color of `.ExportIcon` to red on hover in `app/components/chat/BaseChat.module.scss`.
  - Add CSS rule to change text color of other navigation icons to red on hover in `app/components/chat/BaseChat.module.scss`.
  - Add class `ExportIcon` to the `IconButton` component in `app/components/chat/ExportChatButton.tsx`.
  - Add class `NavigationIcon` to other navigation icons in `app/components/sidebar/Menu.client.tsx`.
  • Loading branch information
VikasShivakumar committed Nov 25, 2024
1 parent 1cb836a commit a19ecb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/components/chat/BaseChat.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@
.Chat {
opacity: 1;
}

.ExportIcon:hover {
color: red;
}

.NavigationIcon:hover {
color: red;
}
2 changes: 1 addition & 1 deletion app/components/chat/ExportChatButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';
export const ExportChatButton = ({ exportChat }: { exportChat?: () => void }) => {
return (
<WithTooltip tooltip="Export Chat">
<IconButton title="Export Chat" onClick={() => exportChat?.()}>
<IconButton title="Export Chat" onClick={() => exportChat?.()} className="ExportIcon">
<div className="i-ph:download-simple text-xl"></div>
</IconButton>
</WithTooltip>
Expand Down
1 change: 1 addition & 0 deletions app/components/sidebar/Menu.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export function Menu() {
exportChat={exportChat}
onDelete={(event) => handleDeleteClick(event, item)}
onDuplicate={() => handleDuplicate(item.id)}
className="NavigationIcon"

Check failure on line 147 in app/components/sidebar/Menu.client.tsx

View workflow job for this annotation

GitHub Actions / Test

Type '{ key: string; item: ChatHistoryItem; exportChat: (id?: string | undefined) => Promise<void>; onDelete: (event: UIEvent<Element, UIEvent>) => void; onDuplicate: () => Promise<...>; className: string; }' is not assignable to type 'IntrinsicAttributes & HistoryItemProps'.
/>
))}
</div>
Expand Down

0 comments on commit a19ecb8

Please sign in to comment.