jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
22 lines (16 loc) • 803 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
/**
* @file index.tsx
*
* @fileoverview Renders and image with some predefined properties like sizes and lazy loading.
*/
/**
* Displays an image with optional lazy loading and size attributes.
*/
const Image = ({ src, width, height, lazy = true, alt, title }) => (React__default.createElement("img", Object.assign({ src: src }, (width ? { width } : null), (height ? { height } : null), (lazy ? { loading: 'lazy' } : null), { alt: alt }, (title ? { title } : null))));
exports.Image = Image;
exports.default = Image;