Skip to content

Commit

Permalink
Merge pull request #1400 from kunalmaurya6/tooltip
Browse files Browse the repository at this point in the history
add tooltip
  • Loading branch information
panwar8279 authored Jul 8, 2024
2 parents a06f6e0 + 5b69f19 commit c46f0e5
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
20 changes: 20 additions & 0 deletions frontend/src/ChatAssistant/ChatAssistant.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,23 @@
border-radius: 50px;
}
}
.chatbot:hover .tooltiptext{

top: -2.5em;
left: -1em;
visibility: visible;
opacity: 1;
}
.tooltiptext{
position: absolute;
top: 0;
left: 2em;
transform: transLateX(-50%);
background-color:rgb(207, 238, 238);
color: rgb(197, 129, 129);
white-space: nowrap;
padding: 5px 10px;
border-radius: 7px;
visibility: hidden;
transition: opacity 0.5s ease;
}
1 change: 1 addition & 0 deletions frontend/src/ChatAssistant/ChatAssistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const ChatAssistant = () => {

return (
<div className='chatbot'>
<span className="tooltiptext">Chat boat</span>
<img
className='Logo'
src={chatbotLogo}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/Component/BackToTopButton.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import '../style/BackToTopButton.css'
import '../style/BackToTopButton.css';

import { MdKeyboardDoubleArrowUp } from "react-icons/md";

Expand Down Expand Up @@ -47,6 +47,7 @@ function BackToTopButton() {
>
<MdKeyboardDoubleArrowUp style={iconStyle}/>

<span className='tooltiptext'>Go top page</span>
</button>
</a>
);
Expand Down
22 changes: 21 additions & 1 deletion frontend/src/style/BackToTopButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,29 @@
}


.back-to-top-button:hover {
.back-to-top-button:hover{
background-color: rgba(17, 99, 76, 0.856);
transform: scale(1.1);
cursor: none;
}
.back-to-top-button:hover .tooltiptext{

top: -2.5em;
left: -1em;
visibility: visible;
opacity: 1;
}
.tooltiptext{
position: absolute;
top: 0;
left: 2em;
transform: transLateX(-50%);
background-color:rgb(207, 238, 238);
color: rgb(197, 129, 129);
white-space: nowrap;
padding: 5px 10px;
border-radius: 7px;
visibility: hidden;
transition: opacity 0.5s ease;
}

Empty file added frontend/src/style/tooltip.css
Empty file.

0 comments on commit c46f0e5

Please sign in to comment.