1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-15 07:40:07 +02:00
copilot/packages/ui-toolkit/src/tooltip/button.js
2017-08-28 20:24:36 +01:00

50 lines
984 B
JavaScript

import React from 'react';
import styled from 'styled-components';
import unitcalc from 'unitcalc';
import is from 'styled-is';
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;
}
&[disabled] {
cursor: not-allowed;
pointer-events: none;
}
${is('disabled')`
color: ${props => props.theme.grey};
`};
`;
const TooltipButton = props => <StyledButton {...props} />;
export default TooltipButton;