Skip to content

Commit

Permalink
Added the time out function for the tooltip to
Browse files Browse the repository at this point in the history
disappear.
  • Loading branch information
jenbreese committed Dec 19, 2024
1 parent 53d88fe commit 8324936
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/elements/favorites-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ const ShareButtons = () => {
<>
<button
className="text-center font-semibold hocus:underline"
onClick={ev => {
onClick={() => {
copyToClip(copyUrl)
setIsActive(!isActive)
setTimeout(() => {
setIsActive(isActive)
}, 4000)
}}
data-course-shared="Favorites"
disabled={!favs.length}
Expand All @@ -43,10 +46,10 @@ const ShareButtons = () => {
/>
Copy
</button>
{/* className={"list-unstyled " + (isActive ? "" : "tw-hidden")} */}
<div
role="tooltip"
className={twMerge(
"r-4 absolute right-0 top-[-35px] w-[80px] bg-fog p-3 text-[.8em] text-black",
"r-4 absolute right-0 top-[-35px] w-[90px] bg-fog p-3 text-[.70em] text-black",
clsx({"tw-hidden": !isActive})
)}
>
Expand Down

0 comments on commit 8324936

Please sign in to comment.