react-tooltip 4.3.1 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.es.js +4 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/react-tooltip.d.ts +13 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -80,6 +80,7 @@ Notes:
|
|
|
80
80
|
| delayUpdate | data-delay-update | Number | | `<p data-tip="tooltip" data-delay-update='1000'></p>` or `<ReactTooltip delayUpdate={1000} />` Sets a delay in calling getContent if the tooltip is already shown and you mouse over another target |
|
|
81
81
|
| insecure | null | Bool | true, false | Whether to inject the style header into the page dynamically (violates CSP style-src but is a convenient default) |
|
|
82
82
|
| border | data-border | Bool | true, false | Add one pixel white border |
|
|
83
|
+
| borderClass | data-border-class | String | e.g. custom-border-class | A custom class name to use for the border - enabled by the `border` prop |
|
|
83
84
|
| textColor | data-text-color | String | e.g. red | Popup text color |
|
|
84
85
|
| backgroundColor | data-background-color | String | e.g. yellow | Popup background color |
|
|
85
86
|
| borderColor | data-border-color | String | e.g. green | Popup border color - enabled by the `border` value |
|
package/dist/index.es.js
CHANGED
|
@@ -2452,6 +2452,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
|
|
|
2452
2452
|
// float or fixed
|
|
2453
2453
|
show: false,
|
|
2454
2454
|
border: false,
|
|
2455
|
+
borderClass: 'border',
|
|
2455
2456
|
customColors: {},
|
|
2456
2457
|
offset: {},
|
|
2457
2458
|
padding: props.padding,
|
|
@@ -2786,6 +2787,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
|
|
|
2786
2787
|
delayHide: target.getAttribute('data-delay-hide') || self.props.delayHide || 0,
|
|
2787
2788
|
delayUpdate: target.getAttribute('data-delay-update') || self.props.delayUpdate || 0,
|
|
2788
2789
|
border: (target.getAttribute('data-border') ? target.getAttribute('data-border') === 'true' : self.props.border) || false,
|
|
2790
|
+
borderClass: target.getAttribute('data-border-class') || self.props.borderClass || 'border',
|
|
2789
2791
|
extraClass: target.getAttribute('data-class') || self.props["class"] || self.props.className || '',
|
|
2790
2792
|
disable: (target.getAttribute('data-tip-disable') ? target.getAttribute('data-tip-disable') === 'true' : self.props.disable) || false,
|
|
2791
2793
|
currentTarget: target
|
|
@@ -3052,7 +3054,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
|
|
|
3052
3054
|
var content = this.getTooltipContent();
|
|
3053
3055
|
var isEmptyTip = this.isEmptyTip(content);
|
|
3054
3056
|
var style = generateTooltipStyle(this.state.uuid, this.state.customColors, this.state.type, this.state.border, this.state.padding);
|
|
3055
|
-
var tooltipClass = '__react_component_tooltip' + " ".concat(this.state.uuid) + (this.state.show && !disable && !isEmptyTip ? ' show' : '') + (this.state.border ? '
|
|
3057
|
+
var tooltipClass = '__react_component_tooltip' + " ".concat(this.state.uuid) + (this.state.show && !disable && !isEmptyTip ? ' show' : '') + (this.state.border ? ' ' + this.state.borderClass : '') + " place-".concat(this.state.place) + // top, bottom, left, right
|
|
3056
3058
|
" type-".concat(this.hasCustomColors() ? 'custom' : this.state.type) + (
|
|
3057
3059
|
// dark, success, warning, error, info, light, custom
|
|
3058
3060
|
this.props.delayUpdate ? ' allow_hover' : '') + (this.props.clickable ? ' allow_click' : '');
|
|
@@ -3105,6 +3107,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
|
|
|
3105
3107
|
padding: PropTypes.string,
|
|
3106
3108
|
multiline: PropTypes.bool,
|
|
3107
3109
|
border: PropTypes.bool,
|
|
3110
|
+
borderClass: PropTypes.string,
|
|
3108
3111
|
textColor: PropTypes.string,
|
|
3109
3112
|
backgroundColor: PropTypes.string,
|
|
3110
3113
|
borderColor: PropTypes.string,
|