/* @flow */
import R from 'ramda';
import React from 'react';
import styled from 'styled-components';
import { font, palette } from 'styled-theme';
import Dimmer from '../Dimmer';
import { theme } from '../theme';
type Props = {
overlay?: string | React$Element<*>,
src: string,
alt: string,
cta?: React$Element<*>,
};
const Wrapper = styled.div`
position: relative;
display: inline-block;
overflow: hidden;
background-color: transparent;
border-radius: ${theme.borders.radius};
`;
const Image = styled.img`
display: block;
max-width: 100%;
height: auto;
`;
const CallToAction = styled.div`
margin-top: 1rem;
`;
const renderCTA = R.ifElse(
R.has('cta'),
props => {props.cta},
R.always(null),
);
const Photo = (props: Props) =>
{props.overlay}{renderCTA(props)}
;
export default Photo;