Commit 5172db1a by Michael Roytman

this didn't go in the original commit?

parent 8d90814d
...@@ -35,17 +35,27 @@ export default class Tooltip extends React.Component { ...@@ -35,17 +35,27 @@ export default class Tooltip extends React.Component {
// <Button // <Button
// label={<span>Mouse over me for a tooltip!</span>} // label={<span>Mouse over me for a tooltip!</span>}
// /> // />
// {this.state.mouseOver && <span className={classNames(styles['tooltip-inner'], styles['tooltip-bottom'])}>Tooltip text</span>} // {this.state.mouseOver && <span className={classNames(styles['tooltip-inner'],
// styles['tooltip-bottom'])}>Tooltip text</span>}
// </div> // </div>
// ); // );
return ( return (
<div className={classNames(styles.tooltip, styles.show)} role="tooltip" onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}> <div
className={classNames(styles.tooltip, styles.show)}
role="tooltip"
onMouseOver={this.handleMouseOver}
onMouseOut={this.handleMouseOut}
>
{this.props.children} {this.props.children}
<Button <Button
label="Tooltip!" label="Tooltip!"
/> />
<div className={classNames(styles['arrow'])} />
{this.state.mouseOver && <div className={classNames(styles['tooltip-inner'])}>I am the tooltip!</div>} <div className={classNames(styles.arrow)} />
{this.state.mouseOver && <div className={classNames(styles['tooltip-inner'])}>
I am the tooltip!
{this.props.toolTipText}
</div>}
</div> </div>
); );
} }
...@@ -54,7 +64,7 @@ export default class Tooltip extends React.Component { ...@@ -54,7 +64,7 @@ export default class Tooltip extends React.Component {
Tooltip.propTypes = { Tooltip.propTypes = {
toolTipText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, toolTipText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
toolTipPosition: PropTypes.string.isRequired, // toolTipPosition: PropTypes.string.isRequired,
children: PropTypes.element.isRequired, children: PropTypes.element.isRequired,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment