-
-
Notifications
You must be signed in to change notification settings - Fork 213
Expand file tree
/
Copy pathFabButton.tsx
More file actions
68 lines (65 loc) · 1.87 KB
/
FabButton.tsx
File metadata and controls
68 lines (65 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { Fab, Action } from "react-tiny-fab";
import { MdExplore } from "react-icons/md";
import { FaCircleQuestion } from "react-icons/fa6";
import {tour} from "./Tour";
import FabGlobalStyle from "../styles/components/FabGlobalStyles";
const FloatingFAB = () => {
const startTourEvent = () => {
void tour.start();
};
return (
<>
<FabGlobalStyle />
<Fab
icon={<FaCircleQuestion />}
alwaysShowTitle
mainButtonStyles={{
backgroundColor: "#1B2540",
color: "white",
width: "50px",
height: "50px",
boxShadow: "0px 6px 10px rgba(0, 0, 0, 0.25)",
borderRadius: "50%",
transition: "all 0.3s ease-in-out",
display: "flex",
justifyContent: "center",
alignItems: "center",
fontSize: "24px",
padding: "5px",
}}
style={{
position: "fixed",
bottom: "20px",
right: "20px",
zIndex: 1000,
marginBottom: "2.813rem",
marginRight: "0.625rem",
}}
>
<Action
text="Start Tour"
onClick={startTourEvent}
style={{
backgroundColor: "#444444",
color: "white",
width: "45px",
height: "45px",
display: "flex",
justifyContent: "center",
alignItems: "center",
borderRadius: "50%",
fontSize: "22px",
transition:
"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out",
boxShadow: "0px 4px 8px rgba(0, 0, 0, 0.2)",
}}
onMouseEnter={(e) => (e.currentTarget.style.transform = "scale(1.1)")}
onMouseLeave={(e) => (e.currentTarget.style.transform = "scale(1)")}
>
<MdExplore />
</Action>
</Fab>
</>
);
};
export default FloatingFAB;