@atlaskit/empty-state
Version:
An empty state appears when there is no data to display and describes what the user can do next.
40 lines (39 loc) • 1.98 kB
JavaScript
/* image.tsx generated by @compiled/babel-plugin v3.0.2 */
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import "./image.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var CSS_VAR_MAX_WIDTH = '--max-width';
var CSS_VAR_MAX_HEIGHT = '--max-height';
var imageStyles = null;
/**
* __Image__
*
* Image in Empty State.
*
* @internal
*/
var Image = function Image(_ref) {
var maxHeight = _ref.maxHeight,
maxWidth = _ref.maxWidth,
_ref$height = _ref.height,
height = _ref$height === void 0 ? 'auto' : _ref$height,
_ref$width = _ref.width,
width = _ref$width === void 0 ? 'auto' : _ref$width,
src = _ref.src;
return /*#__PURE__*/React.createElement("img", {
width: width,
height: height,
alt: "",
role: "presentation",
src: src,
className: ax(["_1e0c1ule _p12f163m _c71l649k _6rth1ejb _1pfhidpf _12l21wug _ahbq1wug"]),
style: _objectSpread(_objectSpread({}, _defineProperty(_defineProperty({}, CSS_VAR_MAX_WIDTH, "".concat(maxWidth, "px")), CSS_VAR_MAX_HEIGHT, "".concat(maxHeight, "px"))), {}, {
"--_11x3y0": ix("var(".concat(CSS_VAR_MAX_WIDTH, ")")),
"--_zsxb2b": ix("var(".concat(CSS_VAR_MAX_HEIGHT, ")"))
})
});
};
export default Image;