1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-25 23:41:07 +00:00

add prop delayed to Tooltip component

This commit is contained in:
slowbackspace 2019-01-16 10:40:56 +01:00
parent d07488146a
commit 0efcc2c5be

View File

@ -31,11 +31,13 @@ const Tooltip = ({
content, content,
readMoreLink, readMoreLink,
children, children,
delayed,
}) => ( }) => (
<Wrapper className={className}> <Wrapper className={className}>
<RcTooltip <RcTooltip
arrowContent={<div className="rc-tooltip-arrow-inner" />} arrowContent={<div className="rc-tooltip-arrow-inner" />}
placement={placement} placement={placement}
mouseEnterDelay={delayed ? 1.5 : 0}
overlay={() => ( overlay={() => (
<ContentWrapper> <ContentWrapper>
<Content maxWidth={maxWidth}>{content}</Content> <Content maxWidth={maxWidth}>{content}</Content>
@ -65,6 +67,7 @@ Tooltip.propTypes = {
PropTypes.string, PropTypes.string,
]), ]),
readMoreLink: PropTypes.string, readMoreLink: PropTypes.string,
delayed: PropTypes.bool,
}; };
export default Tooltip; export default Tooltip;