@zohodesk/dot
Version:
In this Library, we Provide Some Basic Components to Build Your Application
36 lines • 821 B
JavaScript
import React from 'react';
import { defaultProps } from "./props/defaultProps";
import { propTypes } from "./props/propTypes";
import style from "../../Image/Image.module.css";
export default function Image(props) {
let {
alt,
src,
className,
isCover,
title,
onClick,
dataId,
htmlId,
eleRef,
original,
onLoad,
onError
} = props;
return /*#__PURE__*/React.createElement("img", {
src: src,
alt: alt,
"data-title": title,
"data-id": dataId,
"data-test-id": dataId,
className: ` ${className} ${isCover ? style.imgFullSize : style.imgMaxFullSize} `,
onClick: onClick,
id: htmlId,
ref: eleRef,
"data-original": original,
onLoad: onLoad,
onError: onError
});
}
Image.propTypes = propTypes;
Image.defaultProps = defaultProps;