UNPKG

@airplane/views

Version:

A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.

24 lines (23 loc) 791 B
import { jsx } from "react/jsx-runtime"; import { Image as Image$1 } from "@mantine/core"; import { forwardRef } from "react"; import { ComponentErrorBoundary } from "../errorBoundary/ComponentErrorBoundary.js"; const ImageWithoutRef = ({ innerRef, imageHeight, imageWidth, width, ...restProps }) => { return /* @__PURE__ */ jsx(Image$1, { width: imageWidth, height: imageHeight, ...restProps, ref: innerRef }); }; const Image = /* @__PURE__ */ forwardRef((props, ref) => { return /* @__PURE__ */ jsx(ComponentErrorBoundary, { componentName: DISPLAY_NAME, children: /* @__PURE__ */ jsx(ImageWithoutRef, { ...props, innerRef: ref }) }); }); const DISPLAY_NAME = "Image"; Image.displayName = DISPLAY_NAME; export { Image, ImageWithoutRef }; //# sourceMappingURL=Image.js.map