react-simple-tooltip
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -0,1 +1,5 @@ | ||
# 2.3.1 — 2018-03-12 | ||
* Fixed: Removed warning when onMouseEnter and Leave are booleans instead of undefined by @vincentdesmares | ||
# 2.3.0 - 2018-01-04 | ||
@@ -24,3 +28,3 @@ | ||
* Changed: Import PropTypes from `prop-types` package | ||
* Updated: Import PropTypes from `prop-types` package | ||
* Added: Yarn | ||
@@ -30,3 +34,3 @@ | ||
* Changed: webpack build | ||
* Updated: webpack build | ||
@@ -39,11 +43,11 @@ # 1.0.4 - 2015-07-08 | ||
* Added: fixed tooltip example | ||
* Added: fixed tooltip example | ||
# 1.0.2 - 2015-07-02 | ||
* Changed: tooltips example screenshot | ||
* Updated: tooltips example screenshot | ||
# 1.0.1 - 2015-07-02 | ||
* Changed: repository url in package.json | ||
* Updated: repository url in package.json | ||
* Added: Npm Badge in README | ||
@@ -50,0 +54,0 @@ |
@@ -108,4 +108,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
_extends({ | ||
onMouseEnter: !fixed && this.handleMouseEnter, | ||
onMouseLeave: !fixed && this.handleMouseLeave | ||
onMouseEnter: !fixed ? this.handleMouseEnter : undefined, | ||
onMouseLeave: !fixed ? this.handleMouseLeave : undefined | ||
}, props), | ||
@@ -125,3 +125,2 @@ children, | ||
Wrapper.propTypes = process.env.NODE_ENV !== "production" ? { | ||
offset: PropTypes.number, | ||
arrow: PropTypes.number, | ||
@@ -133,15 +132,15 @@ background: PropTypes.string, | ||
content: PropTypes.any.isRequired, | ||
fadeDuration: PropTypes.number, | ||
fadeEasing: easingPropType, | ||
fixed: PropTypes.bool, | ||
fontFamily: PropTypes.string, | ||
fontSize: PropTypes.string, | ||
offset: PropTypes.number, | ||
padding: PropTypes.number, | ||
placement: PropTypes.oneOf(["left", "top", "right", "bottom"]), | ||
radius: PropTypes.number, | ||
zIndex: PropTypes.number, | ||
fadeEasing: easingPropType, | ||
fadeDuration: PropTypes.number | ||
zIndex: PropTypes.number | ||
} : {}; | ||
Wrapper.defaultProps = { | ||
offset: 0, | ||
arrow: 8, | ||
@@ -152,11 +151,12 @@ background: "#000", | ||
color: "#fff", | ||
fadeDuration: 0, | ||
fadeEasing: "linear", | ||
fixed: false, | ||
fontFamily: "inherit", | ||
fontSize: "inherit", | ||
offset: 0, | ||
padding: 16, | ||
placement: "top", | ||
radius: 0, | ||
zIndex: 1, | ||
fadeEasing: "linear", | ||
fadeDuration: 0 | ||
zIndex: 1 | ||
}; | ||
@@ -163,0 +163,0 @@ |
@@ -131,4 +131,4 @@ "use strict"; | ||
_extends({ | ||
onMouseEnter: !fixed && this.handleMouseEnter, | ||
onMouseLeave: !fixed && this.handleMouseLeave | ||
onMouseEnter: !fixed ? this.handleMouseEnter : undefined, | ||
onMouseLeave: !fixed ? this.handleMouseLeave : undefined | ||
}, props), | ||
@@ -148,3 +148,2 @@ children, | ||
Wrapper.propTypes = process.env.NODE_ENV !== "production" ? { | ||
offset: _propTypes2.default.number, | ||
arrow: _propTypes2.default.number, | ||
@@ -156,15 +155,15 @@ background: _propTypes2.default.string, | ||
content: _propTypes2.default.any.isRequired, | ||
fadeDuration: _propTypes2.default.number, | ||
fadeEasing: _propTypes3.easingPropType, | ||
fixed: _propTypes2.default.bool, | ||
fontFamily: _propTypes2.default.string, | ||
fontSize: _propTypes2.default.string, | ||
offset: _propTypes2.default.number, | ||
padding: _propTypes2.default.number, | ||
placement: _propTypes2.default.oneOf(["left", "top", "right", "bottom"]), | ||
radius: _propTypes2.default.number, | ||
zIndex: _propTypes2.default.number, | ||
fadeEasing: _propTypes3.easingPropType, | ||
fadeDuration: _propTypes2.default.number | ||
zIndex: _propTypes2.default.number | ||
} : {}; | ||
Wrapper.defaultProps = { | ||
offset: 0, | ||
arrow: 8, | ||
@@ -175,11 +174,12 @@ background: "#000", | ||
color: "#fff", | ||
fadeDuration: 0, | ||
fadeEasing: "linear", | ||
fixed: false, | ||
fontFamily: "inherit", | ||
fontSize: "inherit", | ||
offset: 0, | ||
padding: 16, | ||
placement: "top", | ||
radius: 0, | ||
zIndex: 1, | ||
fadeEasing: "linear", | ||
fadeDuration: 0 | ||
zIndex: 1 | ||
}; | ||
@@ -186,0 +186,0 @@ |
{ | ||
"name": "react-simple-tooltip", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"author": { | ||
@@ -9,14 +9,5 @@ "name": "Cédric Delpoux", | ||
"description": "A lightweight and simple tooltip component for React", | ||
"files": [ | ||
"css", | ||
"es", | ||
"lib", | ||
"umd" | ||
], | ||
"files": ["css", "es", "lib", "umd"], | ||
"homepage": "https://github.com/xuopled/react-simple-tooltip#readme", | ||
"keywords": [ | ||
"react", | ||
"tooltip", | ||
"bubble" | ||
], | ||
"keywords": ["react", "tooltip", "bubble"], | ||
"license": "MIT", | ||
@@ -23,0 +14,0 @@ "main": "lib/index.js", |
@@ -35,9 +35,11 @@ # react-simple-tooltip | ||
const App = () => | ||
const App = () => ( | ||
<Tooltip content="😎"> | ||
<button>Hover me !</button> | ||
</Tooltip> | ||
) | ||
``` | ||
### Standalone | ||
```javascript | ||
@@ -47,3 +49,3 @@ import React from "react" | ||
const App = () => | ||
const App = () => ( | ||
<div style={{position: "relative"}}> | ||
@@ -55,2 +57,3 @@ <Tooltip | ||
</div> | ||
) | ||
``` | ||
@@ -64,16 +67,18 @@ | ||
|Name|PropType|Description|Default | ||
|---|---|---|--- | ||
|arrow|PropTypes.number|Arrow size, in pixels|8 | ||
|background|PropTypes.string|Tooltip background color|"#000" | ||
|border|PropTypes.string|Tooltip border color|"#000" | ||
|color|PropTypes.string|Tooltip text color|"#fff" | ||
|content|PropTypes.any.isRequired|Tooltip content|- | ||
|fixed|PropTypes.bool|Tooltip behavior, hover by default|false | ||
|fontFamily|PropTypes.bool|Tooltip text font-family|"inherit" | ||
|fontSize|PropTypes.bool|Tooltip text font-size|"inherit" | ||
|padding|PropTypes.number|Tooltip padding, in pixels|16 | ||
|placement|PropTypes.oneOf(["left", "top", "right", "bottom"])|Tooltip placement|"top" | ||
|radius|PropTypes.number|Tooltip border radius|0 | ||
|zIndex|PropTypes.number|Tooltip z-index|1 | ||
| Name | PropType | Description | Default | | ||
| ------------ | --------------------------------------------------- | ---------------------------------- | --------- | | ||
| arrow | PropTypes.number | Arrow size, in pixels | 8 | | ||
| background | PropTypes.string | Tooltip background color | "#000" | | ||
| border | PropTypes.string | Tooltip border color | "#000" | | ||
| color | PropTypes.string | Tooltip text color | "#fff" | | ||
| content | PropTypes.any.isRequired | Tooltip content | - | | ||
| fadeDuration | PropTypes.number | Fade duration, in milliseconds | 0 | | ||
| fadeEasing | PropTypes.string | Fade easing | "linear" | | ||
| fixed | PropTypes.bool | Tooltip behavior, hover by default | false | | ||
| fontFamily | PropTypes.bool | Tooltip text font-family | "inherit" | | ||
| fontSize | PropTypes.bool | Tooltip text font-size | "inherit" | | ||
| padding | PropTypes.number | Tooltip padding, in pixels | 16 | | ||
| placement | PropTypes.oneOf(["left", "top", "right", "bottom"]) | Tooltip placement | "top" | | ||
| radius | PropTypes.number | Tooltip border radius | 0 | | ||
| zIndex | PropTypes.number | Tooltip z-index | 1 | | ||
@@ -98,12 +103,8 @@ ## Contributing | ||
[npm]: https://www.npmjs.org/package/react-simple-tooltip | ||
[build-badge]: https://img.shields.io/travis/xuopled/react-simple-tooltip/master.svg?style=flat-square | ||
[build]: https://travis-ci.org/xuopled/react-simple-tooltip | ||
[codecov-badge]: https://img.shields.io/codecov/c/github/xuopled/react-simple-tooltip.svg?style=flat-square | ||
[codecov]: https://codecov.io/gh/xuopled/react-simple-tooltip | ||
[module-formats]: https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg?style=flat-square | ||
[github-page]: https://xuopled.github.io/react-simple-tooltip | ||
[github-issue]: https://github.com/xuopled/react-simple-tooltip/issues/new |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173345
106