UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

22 lines (16 loc) 803 B
'use strict'; 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;