File size: 656 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"use client"

import { type BoxProps, Image, Square, useAvatar } from "@chakra-ui/react"
import { LuImage } from "react-icons/lu"

interface Props {
  image: string
  name: string
  size?: BoxProps["boxSize"]
}

export const SponsorImage = (props: Props) => {
  const { image, name, size = "10" } = props

  const avatar = useAvatar()

  return (
    <span {...avatar.getRootProps()}>
      <Image
        src={image}
        alt={name}
        boxSize={size}
        rounded="md"
        {...avatar.getImageProps()}
      />
      <Square color="fg.subtle" size={size} {...avatar.getFallbackProps()}>
        <LuImage />
      </Square>
    </span>
  )
}