2017-07-26 15:50:49 +03:00
|
|
|
import React from 'react';
|
2017-06-16 17:12:28 +03:00
|
|
|
import unitcalc from 'unitcalc';
|
|
|
|
import theme from '../theme';
|
|
|
|
import Button from '../button';
|
|
|
|
import { CloseIcon } from '../icons';
|
|
|
|
|
|
|
|
const StyledCloseButton = Button.extend`
|
|
|
|
background-color: ${theme.white};
|
|
|
|
padding: ${unitcalc(2)};
|
|
|
|
min-width: auto;
|
|
|
|
border: none;
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active,
|
|
|
|
&:active:hover,
|
|
|
|
&:active:focus {
|
|
|
|
background-color: ${theme.white};
|
|
|
|
border: none;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @example ./usage.md
|
|
|
|
*/
|
2017-08-28 22:21:08 +03:00
|
|
|
const CloseButton = props => (
|
2017-06-16 17:12:28 +03:00
|
|
|
<StyledCloseButton {...props}>
|
|
|
|
<CloseIcon />
|
2017-08-28 22:21:08 +03:00
|
|
|
</StyledCloseButton>
|
|
|
|
);
|
2017-06-16 17:12:28 +03:00
|
|
|
|
|
|
|
export default CloseButton;
|