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)

37 lines (34 loc) 1.1 kB
import { __rest } from '../../../../../node_modules/tslib/tslib.es6.js'; import React__default from 'react'; import styled from 'styled-components'; /** * @file index.tsx * * @fileoverview Shows a text next to an image. */ const StyledImageTextWrapper = styled.div ` display: flex; flex-direction: column; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: center; `; const StyledImage = styled.img ` margin-top: 3rem; margin-bottom: 1.5rem; width: 65%; `; const StyledText = styled.p ` color: ${props => props.theme.colors.gray4}; `; /** * This component provides an image with a text underneath. */ const ImageText = (_a) => { var { image, children } = _a, props = __rest(_a, ["image", "children"]); return (React__default.createElement(StyledImageTextWrapper, null, React__default.createElement(StyledImage, Object.assign({ src: image.url, alt: image.alt, title: image.title }, props)), React__default.createElement(StyledText, null, children))); }; export { ImageText, StyledImage, StyledText };