memorium/components/Image.tsx

27 lines
496 B
TypeScript

import { asset } from "$fresh/runtime.ts";
import * as CSS from "https://esm.sh/csstype@3.1.2";
const Image = (
props: {
class: string;
src: string;
alt?: string;
width?: number | string;
height?: number | string;
style?: CSS.HtmlAttributes;
},
) => {
return (
<img
alt={props.alt}
style={props.style}
src={asset(props.src)}
width={props.width}
height={props.height}
class={props.class}
/>
);
};
export default Image;