tooltip component cleaned

This commit is contained in:
ahmed-Bazzara
2019-02-15 08:56:26 +01:00
parent b1204e0929
commit 09d9055643

View File

@@ -1,18 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
const getPos = () => {
console.log(window.pageXOffset);
return {
left: window.pageXOffset,
top: window.pageYOffset
};
};
const Tooltip = ({ data, xPosition, yPosition }) => (
<div
style={{ "left": `${xPosition - 20}px`,
"top": `${yPosition - 75}px` }} className="tooltip-wrapper"
className="tooltip-wrapper"
style={{ 'left': `${xPosition - 20}px`,
'top': `${yPosition - 75}px` }}
>
<p>
{data}