trepur_components 0.2.16 → 0.2.17
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.
|
@@ -40,7 +40,6 @@ const InformationIcon = _ref => {
|
|
|
40
40
|
hoverBgColor,
|
|
41
41
|
withAnimation
|
|
42
42
|
} = _ref;
|
|
43
|
-
const [isHovering, setIsHovering] = (0, _react.useState)(false);
|
|
44
43
|
let loaded = (0, _react.useRef)(false);
|
|
45
44
|
let imageClassList = 'mx-auto pt-2 ';
|
|
46
45
|
imageClassList += imageClasses ? imageClasses : '';
|
|
@@ -89,10 +88,8 @@ const InformationIcon = _ref => {
|
|
|
89
88
|
color: textColor ? textColor : 'black'
|
|
90
89
|
});
|
|
91
90
|
|
|
92
|
-
const setHoverState =
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (isHovering === true) {
|
|
91
|
+
const setHoverState = isHovering => {
|
|
92
|
+
if (isHovering) {
|
|
96
93
|
setStyles({
|
|
97
94
|
'background-color': hoverBgColor ? hoverBgColor : 'white',
|
|
98
95
|
color: hoverTextColor ? hoverTextColor : 'black'
|
|
@@ -111,8 +108,8 @@ const InformationIcon = _ref => {
|
|
|
111
108
|
}, {
|
|
112
109
|
style: styles,
|
|
113
110
|
className: classList,
|
|
114
|
-
onMouseOver: () => setHoverState(),
|
|
115
|
-
onMouseOut: () => setHoverState()
|
|
111
|
+
onMouseOver: () => setHoverState(true),
|
|
112
|
+
onMouseOut: () => setHoverState(false)
|
|
116
113
|
}), type && /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
117
114
|
type: type,
|
|
118
115
|
size: 4,
|