jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
30 lines (24 loc) • 1.34 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var tslib_es6 = require('../../../../../node_modules/tslib/tslib.es6.js');
var React = require('react');
var React__default = _interopDefault(React);
var styles = require('./styles.js');
/**
* @file index.tsx
*
* @fileoverview The HeroRow component.
*/
/**
* This component provides a hero image and an overlaying text.
*/
const HeroRow = (_a) => {
var { image, children, boxContent, boxPosition } = _a, props = tslib_es6.__rest(_a, ["image", "children", "boxContent", "boxPosition"]);
return (React__default.createElement(styles.HeroWrapper, { boxPosition: boxPosition },
React__default.createElement(styles.Overlay, { boxPosition: boxPosition },
React__default.createElement(styles.StyledPicture, Object.assign({ landscapeSrc: image.url, alt: image.alt, title: image.title }, (image.portrait ? { portraitSrc: image.portrait.url } : null)))),
children && React__default.createElement(styles.HeroText, Object.assign({}, props), children),
boxContent && (React__default.createElement(styles.BoxContent, { boxPosition: boxPosition }, boxContent))));
};
exports.HeroRow = HeroRow;