mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
Merge branch 'styled-components-refactor' of https://github.com/satoshilabs/trezor-wallet into styled-components-refactor
This commit is contained in:
commit
8caf66e39d
@ -172,17 +172,12 @@ const Wrapper = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
class Tooltip extends Component {
|
class Tooltip extends Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.tooltipContainerRef = React.createRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { placement, content, children } = this.props;
|
const { placement, content, children } = this.props;
|
||||||
return (
|
return (
|
||||||
<Wrapper innerRef={this.tooltipContainerRef}>
|
<Wrapper innerRef={(node) => { this.tooltipContainerRef = node; }}>
|
||||||
<RcTooltip
|
<RcTooltip
|
||||||
getTooltipContainer={() => this.tooltipContainerRef.current}
|
getTooltipContainer={() => this.tooltipContainerRef}
|
||||||
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>}
|
||||||
|
Loading…
Reference in New Issue
Block a user