HichamELBSI 2790aed2bd Fix PR review
Signed-off-by: HichamELBSI <elabbassih@gmail.com>
2020-12-28 15:05:28 +01:00

24 lines
752 B
JavaScript

import ReactTooltip from 'react-tooltip';
import styled from 'styled-components';
// TODO : replace by the buffet tooltip component when it will be released
// Add !important to customize CSS is recommended by react-tooltip in the official readme
const Tooltip = styled(ReactTooltip).attrs(({ delayShow = 500, theme }) => ({
// Pre set the tooltip static props.
place: 'bottom',
effect: 'solid',
delayShow,
arrowColor: 'transparent',
backgroundColor: theme.main.colors.greyDark,
}))`
padding: 0.5rem 0.7rem !important;
opacity: 1 !important;
border-radius: ${({ theme }) => theme.main.sizes.borderRadius} !important;
max-width: 400px;
max-height: 400px;
overflow: hidden;
text-overflow: ellipsis;
`;
export default Tooltip;