2017-01-10 18:52:08 +02:00
|
|
|
const React = require('react');
|
|
|
|
const Styled = require('styled-components');
|
2017-01-11 13:41:39 +02:00
|
|
|
|
2017-01-10 19:13:54 +02:00
|
|
|
const fns = require('../../shared/functions');
|
2017-01-10 18:52:08 +02:00
|
|
|
|
|
|
|
const {
|
|
|
|
default: styled
|
|
|
|
} = Styled;
|
|
|
|
|
2017-01-10 19:13:54 +02:00
|
|
|
const {
|
|
|
|
remcalc
|
|
|
|
} = fns;
|
|
|
|
|
2017-01-10 19:00:23 +02:00
|
|
|
const StyledButton = styled.button`
|
|
|
|
background: none;
|
|
|
|
border: none;
|
2017-01-10 19:13:54 +02:00
|
|
|
position: absolute;
|
|
|
|
top: ${remcalc(16)};
|
|
|
|
right: ${remcalc(16)};
|
2017-01-10 19:00:23 +02:00
|
|
|
`;
|
|
|
|
|
2017-01-10 18:52:08 +02:00
|
|
|
const Close = ({
|
|
|
|
style,
|
|
|
|
onClick
|
|
|
|
}) => {
|
|
|
|
return (
|
|
|
|
<StyledButton
|
|
|
|
onClick={onClick}
|
2017-01-10 19:00:23 +02:00
|
|
|
style={style}
|
2017-01-10 18:52:08 +02:00
|
|
|
>
|
2017-01-10 19:00:23 +02:00
|
|
|
<img
|
|
|
|
alt="Close"
|
2017-01-11 13:41:39 +02:00
|
|
|
src="./close.svg"
|
2017-01-10 19:00:23 +02:00
|
|
|
/>
|
2017-01-10 18:52:08 +02:00
|
|
|
</StyledButton>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
Close.propTypes = {
|
2017-01-10 19:00:23 +02:00
|
|
|
onClick: React.PropTypes.func,
|
|
|
|
style: React.PropTypes.object
|
2017-01-10 18:52:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Close;
|