security/codeql-dependabot-gitleaks
| 1 | import { Photo } from "@medusajs/icons" |
| 2 | |
| 3 | interface ThumbnailProps { |
| 4 | thumbnail?: string | null |
| 5 | alt?: string | null |
| 6 | } |
| 7 | |
| 8 | export const Thumbnail = ({ thumbnail, alt = "" }: ThumbnailProps) => { |
| 9 | return ( |
| 10 | <div className="relative w-6 h-8 rounded overflow-hidden flex items-center justify-center bg-ui-bg-component"> |
| 11 | {thumbnail ? ( |
| 12 | <img |
| 13 | src={thumbnail} |
| 14 | className="w-full h-full object-cover" |
| 15 | alt={alt ?? undefined} |
| 16 | /> |
| 17 | ) : ( |
| 18 | <Photo /> |
| 19 | )} |
| 20 | </div> |
| 21 | ) |
| 22 | } |