Files
gridpilot.gg/apps/website/ui/Image.tsx
2026-01-19 18:01:30 +01:00

30 lines
480 B
TypeScript

import React from 'react';
import { Box, BoxProps } from './Box';
export interface ImageProps extends Omit<BoxProps<'img'>, 'children'> {
src: string;
alt: string;
fallbackSrc?: string;
}
/**
* Image
*
* Stateless UI primitive for images.
* For error handling, use SafeImage component.
*/
export const Image = ({
src,
alt,
...props
}: ImageProps) => {
return (
<Box
as="img"
src={src}
alt={alt}
{...props}
/>
);
};