forked from InvolutionHell/involutionhell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHoverCard.tsx
More file actions
30 lines (27 loc) · 967 Bytes
/
HoverCard.tsx
File metadata and controls
30 lines (27 loc) · 967 Bytes
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
import React from "react";
interface HoverCardProps {
children: React.ReactNode;
className?: string;
hoverType?: "darken" | "scale" | "lift" | "glow";
}
export default function HoverCard({
children,
className = "",
hoverType = "scale",
}: HoverCardProps) {
const getHoverStyles = () => {
switch (hoverType) {
case "darken":
return "hover:brightness-90 transition-all duration-200 ease-in-out";
case "scale":
return "hover:scale-105 hover:shadow-lg transition-all duration-200 ease-in-out";
case "lift":
return "hover:-translate-y-1 hover:shadow-lg transition-all duration-200 ease-in-out";
case "glow":
return "hover:shadow-xl hover:shadow-primary/20 transition-all duration-200 ease-in-out";
default:
return "hover:scale-105 hover:shadow-lg transition-all duration-200 ease-in-out";
}
};
return <div className={`${getHoverStyles()} ${className}`}>{children}</div>;
}