website refactor
This commit is contained in:
23
apps/website/ui/Image.tsx
Normal file
23
apps/website/ui/Image.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React, { ImgHTMLAttributes } from 'react';
|
||||
|
||||
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
||||
src: string;
|
||||
alt: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function Image({ src, alt, width, height, className = '', ...props }: ImageProps) {
|
||||
return (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={src}
|
||||
alt={alt}
|
||||
width={width}
|
||||
height={height}
|
||||
className={className}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user