1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

Added wrapper for tooltip

This commit is contained in:
Vladimir Volek 2018-09-05 11:56:45 +02:00
parent 2dcb2aea7a
commit 8146a78f7d

View File

@ -10,7 +10,7 @@ const TooltipContent = styled.div`
font-size: ${FONT_SIZE.SMALLEST}; font-size: ${FONT_SIZE.SMALLEST};
`; `;
const StyledRcTooltip = styled(RcTooltip)` const Wrapper = styled.div`
.rc-tooltip { .rc-tooltip {
position: absolute; position: absolute;
z-index: 1070; z-index: 1070;
@ -173,14 +173,16 @@ const StyledRcTooltip = styled(RcTooltip)`
const Tooltip = ({ const Tooltip = ({
content, placement = 'bottomRight', children, className, content, placement = 'bottomRight', children, className,
}) => ( }) => (
<StyledRcTooltip <Wrapper>
<RcTooltip
className={className} className={className}
arrowContent={<div className="rc-tooltip-arrow-inner" />} arrowContent={<div className="rc-tooltip-arrow-inner" />}
placement={placement} placement={placement}
overlay={<TooltipContent>{content}</TooltipContent>} overlay={<TooltipContent>{content}</TooltipContent>}
> >
{children} {children}
</StyledRcTooltip> </RcTooltip>
</Wrapper>
); );
Tooltip.propTypes = { Tooltip.propTypes = {