2017-05-30 16:06:18 +03:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import unitcalc from 'unitcalc';
|
2017-07-19 19:51:21 +03:00
|
|
|
import is from 'styled-is';
|
2017-05-30 16:06:18 +03:00
|
|
|
import theme from '../theme';
|
|
|
|
import Button from '../button';
|
|
|
|
|
|
|
|
const StyledButton = styled(Button)`
|
|
|
|
width: 100%;
|
|
|
|
padding: ${unitcalc(1)} ${unitcalc(3)};
|
|
|
|
background-color: ${theme.white};
|
|
|
|
color: ${theme.secondary};
|
|
|
|
text-align: left;
|
|
|
|
border: none;
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: ${theme.white};
|
|
|
|
color: ${theme.primary};
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: ${theme.white};
|
|
|
|
color: ${theme.primary};
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&:active:hover,
|
|
|
|
&:active:focus {
|
|
|
|
background-color: ${theme.white};
|
|
|
|
color: ${theme.primary};
|
|
|
|
border: none;
|
|
|
|
}
|
2017-07-19 19:51:21 +03:00
|
|
|
|
|
|
|
&[disabled] {
|
|
|
|
cursor: not-allowed;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
${is('disabled')`
|
|
|
|
color: ${props => props.theme.grey};
|
2017-08-28 22:21:08 +03:00
|
|
|
`};
|
2017-05-30 16:06:18 +03:00
|
|
|
`;
|
|
|
|
|
2017-08-28 22:21:08 +03:00
|
|
|
const TooltipButton = props => <StyledButton {...props} />;
|
2017-05-30 16:06:18 +03:00
|
|
|
|
|
|
|
export default TooltipButton;
|