2017-05-18 02:36:31 +00:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
2017-07-16 21:50:34 +00:00
|
|
|
import styled from 'styled-components';
|
2017-05-18 02:36:31 +00:00
|
|
|
|
|
|
|
type Props = {
|
2017-07-16 21:50:34 +00:00
|
|
|
onClick?: ?Function,
|
2017-05-18 02:36:31 +00:00
|
|
|
grow?: boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
const ClickablePadding = (props: Props) => {
|
2017-07-16 21:50:34 +00:00
|
|
|
return <Container grow={props.grow} onClick={props.onClick} />;
|
2017-05-18 02:36:31 +00:00
|
|
|
};
|
|
|
|
|
2017-07-16 21:50:34 +00:00
|
|
|
const Container = styled.div`
|
2018-03-25 22:56:17 +00:00
|
|
|
min-height: 50vh;
|
2017-07-16 21:50:34 +00:00
|
|
|
padding-top: 50px;
|
|
|
|
cursor: ${({ onClick }) => (onClick ? 'text' : 'default')};
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
${({ grow }) => grow && `flex-grow: 1;`};
|
2017-07-16 21:50:34 +00:00
|
|
|
`;
|
|
|
|
|
2017-05-18 02:36:31 +00:00
|
|
|
export default ClickablePadding;
|