import React from 'react'; export let ToolTip = React.createClass({ propTypes: { body: React.PropTypes.string.isRequired, label: React.PropTypes.string.isRequired }, getInitialState: function() { return { showTooltip: false, }; }, handleClick: function() { this.setState({ showTooltip: !this.state.showTooltip, }); }, handleTooltipMouseOut: function() { this.setState({ showTooltip: false, }); }, render: function() { return ( {this.props.label}
{this.props.body}
); } });