Skip to content

Commit 0c83856

Browse files
committed
added scroll to top tooltip
1 parent 424b38e commit 0c83856

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/client/components/ScrollToTop.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
22
import { IconButton } from "@mui/material";
33
import { useEffect, useState } from "react";
44

5+
import { Tooltip } from "@components";
56
import { useAppContext } from "@hooks";
67

78
export const ScrollToTop = () => {
@@ -21,9 +22,11 @@ export const ScrollToTop = () => {
2122

2223
return (
2324
<div className="scroll-to-top">
24-
<IconButton className="icon-btn" aria-label="Scroll to top" onClick={scrollToTop}>
25-
<ArrowUpwardIcon sx={{ fontSize: "2rem" }} />
26-
</IconButton>
25+
<Tooltip title="Scroll to top">
26+
<IconButton className="icon-btn" aria-label="Scroll to top" onClick={scrollToTop}>
27+
<ArrowUpwardIcon sx={{ fontSize: "2rem" }} />
28+
</IconButton>
29+
</Tooltip>
2730
</div>
2831
);
2932
};

0 commit comments

Comments
 (0)