Skip to content

Commit

Permalink
add tooltip to the clear history and see more history button
Browse files Browse the repository at this point in the history
  • Loading branch information
SantoshChapagai committed Apr 8, 2024
1 parent 0da46e8 commit 7c01d9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/HistoryButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const HistoryButton: React.FC<HistoryButtonProps> = ({ onSelect, isDark, onExpan
</button>
</div>
<hr/>
<button type="reset" onClick={handleClearHistory}>Clear history</button>
<button type="reset" onClick={handleClearHistory} title="Delete all items from your history list">Clear history</button>
<hr className="mb-5"/>
{historyList && historyList.slice(0, itemsToShow).map((item, index) => (
<li key={index} onClick={() => onSelect(item)} className="my-2 cursor-pointer">
Expand All @@ -67,7 +67,7 @@ const HistoryButton: React.FC<HistoryButtonProps> = ({ onSelect, isDark, onExpan

{historyList.length > itemsToShow && (
<>
<button type="submit" onClick={handleMore} className="mb-3" >See more history</button>
<button type="submit" onClick={handleMore} className="mb-3" title="View more items from your history list" >See more history</button>
</>
)}
</ul>
Expand Down

0 comments on commit 7c01d9b

Please sign in to comment.