jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
23 lines (20 loc) • 1.1 kB
JavaScript
import { __rest } from '../../../../../node_modules/tslib/tslib.es6.js';
import React__default from 'react';
import { HeroWrapper, Overlay, StyledPicture, HeroText, BoxContent } from './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 = __rest(_a, ["image", "children", "boxContent", "boxPosition"]);
return (React__default.createElement(HeroWrapper, { boxPosition: boxPosition },
React__default.createElement(Overlay, { boxPosition: boxPosition },
React__default.createElement(StyledPicture, Object.assign({ landscapeSrc: image.url, alt: image.alt, title: image.title }, (image.portrait ? { portraitSrc: image.portrait.url } : null)))),
children && React__default.createElement(HeroText, Object.assign({}, props), children),
boxContent && (React__default.createElement(BoxContent, { boxPosition: boxPosition }, boxContent))));
};
export { HeroRow };