File size: 692 Bytes
3d4392e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import { IconType } from "react-icons/lib"

import { cn } from "@/lib/utils/cn"

export function SingleIcon({
  type,
  className = "",
  thickOnHover = false,
}: {
  type?: IconType
  className?: string
  thickOnHover?: boolean
}) {
  if (!type) {
    return null
  }

  const Icon = type

  return (
  <Icon
    className={cn(
      `absolute`, // necessary to overlap icons into layers, for a nicer effect
      `h-10`,
      `transition-all ease-in-out duration-100`,

       // icons is a bit too fat, let's thin them out
       // for a bit of flair we increase the stroke width on group hover
       thickOnHover ? `stroke-1 group-hover:stroke-2` : ``,
      className,
    )}
  />
)
}