@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
31 lines (29 loc) • 874 B
JavaScript
import { cs } from "../utils/styles.js";
import { omitThemingProps, useStyleConfig } from "../core/theme.js";
import styled from "../core/styled.js";
import vui from "../core/vui.js";
import { jsx } from "react/jsx-runtime";
//#region src/image/image.tsx
const ImageBase = styled.imgBox`
height: auto;
object-fit: cover;
width: 100%;
`;
/** Displays an image. Includes base styling. */
const Image = vui((props, ref) => {
const { alt, className, title, ...rest } = omitThemingProps(props);
const styles = useStyleConfig("Image", props);
return /* @__PURE__ */ jsx(ImageBase, {
alt: alt ? alt : title ? title : "",
className: cs("vui-image", className),
ref,
title,
...styles,
...rest
});
});
Image.displayName = "Image";
//#endregion
export { Image, Image as default, ImageBase };
globalThis.__vuiVersion__ = "5.3.1"
//# sourceMappingURL=image.js.map