Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tooltip - npm Package Compare versions

Comparing version 2.6.5 to 2.7.0

9

HISTORY.md
# History
----
### 2.7.0
- add overlayClassName prop #16
- split delay into mouseEnterDelay and mouseLeaveDelay #15
### 2.6.0
remove renderOverlayToBody prop. defaults to true
### 2.5.0 / 2015-07-28

@@ -5,0 +14,0 @@

23

lib/Tooltip.js

@@ -31,4 +31,6 @@ 'use strict';

overlayStyle: _react2['default'].PropTypes.object,
overlayClassName: _react2['default'].PropTypes.string,
wrapStyle: _react2['default'].PropTypes.object,
delay: _react2['default'].PropTypes.number
mouseEnterDelay: _react2['default'].PropTypes.number,
mouseLeaveDelay: _react2['default'].PropTypes.number
},

@@ -41,3 +43,4 @@

afterVisibleChange: function afterVisibleChange() {},
delay: 0.1,
mouseEnterDelay: 0,
mouseLeaveDelay: 0.1,
overlayStyle: {},

@@ -130,7 +133,7 @@ wrapStyle: {},

onMouseEnter: function onMouseEnter() {
this.delaySetVisible(true);
this.delaySetVisible(true, this.props.mouseEnterDelay);
},
onMouseLeave: function onMouseLeave() {
this.delaySetVisible(false);
this.delaySetVisible(false, this.props.mouseLeaveDelay);
},

@@ -218,2 +221,3 @@

visible: state.visible,
className: props.overlayClassName,
trigger: props.trigger,

@@ -278,10 +282,11 @@ placement: props.placement,

delaySetVisible: function delaySetVisible(visible) {
delaySetVisible: function delaySetVisible(visible, delayS) {
var _this2 = this;
var delay = this.props.delay * 1000;
var delay = delayS * 1000;
if (this.delayTimer) {
clearTimeout(this.delayTimer);
this.delayTimer = null;
}
if (delay) {
if (this.delayTimer) {
clearTimeout(this.delayTimer);
}
this.delayTimer = setTimeout(function () {

@@ -288,0 +293,0 @@ _this2.setVisible(visible);

{
"name": "rc-tooltip",
"version": "2.6.5",
"version": "2.7.0",
"description": "tooltip ui component for react",

@@ -11,2 +11,6 @@ "keywords": [

],
"files": [
"lib",
"assets/*.css"
],
"main": "lib/index",

@@ -13,0 +17,0 @@ "homepage": "http://github.com/react-component/tooltip",

@@ -72,6 +72,18 @@ # rc-tooltip

<tr>
<td>delay</td>
<td>overlayClassName</td>
<td>string</td>
<td></td>
<td>additional className added to popup overlay</td>
</tr>
<tr>
<td>mouseEnterDelay</td>
<td>number</td>
<td>0</td>
<td>delay time to show when mouse enter.unit: s.</td>
</tr>
<tr>
<td>mouseLeaveDelay</td>
<td>number</td>
<td>0.1</td>
<td>delay time to show or hide, only valid for hover trigger.unit: s.</td>
<td>delay time to hide when mouse leave.unit: s.</td>
</tr>

@@ -78,0 +90,0 @@ <tr>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc