mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-14 14:58:28 +00:00
14 lines
364 B
TypeScript
14 lines
364 B
TypeScript
import { Img } from "@react-email/components";
|
|
import * as React from "react";
|
|
import { getGlobalBasePath } from "./BasePath";
|
|
|
|
type ImageProps = Omit<Parameters<typeof Img>[0], "src"> & {
|
|
path: string;
|
|
};
|
|
|
|
export function Image({ path, ...props }: ImageProps) {
|
|
const basePath = getGlobalBasePath();
|
|
|
|
return <Img src={`${basePath}${path}`} {...props} />;
|
|
}
|