ui-kit-ck-consultant 0.5.254 → 0.5.256
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/dist/index.js +41 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +41 -6
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -194,22 +194,57 @@ var Button = /*#__PURE__*/function (_React$Component) {
|
|
194
194
|
var ButtonIcon = /*#__PURE__*/function (_React$Component) {
|
195
195
|
_inheritsLoose(ButtonIcon, _React$Component);
|
196
196
|
|
197
|
-
function ButtonIcon() {
|
198
|
-
|
197
|
+
function ButtonIcon(props) {
|
198
|
+
var _this;
|
199
|
+
|
200
|
+
_this = _React$Component.call(this, props) || this;
|
201
|
+
_this.state = {
|
202
|
+
isHover: false
|
203
|
+
};
|
204
|
+
return _this;
|
199
205
|
}
|
200
206
|
|
201
207
|
var _proto = ButtonIcon.prototype;
|
202
208
|
|
203
209
|
_proto.render = function render() {
|
204
|
-
var _classNames
|
210
|
+
var _classNames,
|
211
|
+
_this2 = this;
|
205
212
|
|
206
213
|
var buttonClass = classNames$1((_classNames = {}, _classNames[style$1.button_icon] = true, _classNames[style$1.white] = !!this.props.white, _classNames[style$1.small] = !!this.props.small, _classNames[style$1.big] = !!this.props.big, _classNames[this.props.className] = !!this.props.className, _classNames[style$1.button_icon_background] = !!this.props.isBackground, _classNames));
|
207
|
-
return /*#__PURE__*/React__default.createElement("
|
214
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
215
|
+
style: {
|
216
|
+
position: 'relative'
|
217
|
+
}
|
218
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
208
219
|
className: buttonClass,
|
209
220
|
onClick: this.props.onClick,
|
210
221
|
disabled: this.props.disabled,
|
211
|
-
style: this.props.style
|
212
|
-
|
222
|
+
style: this.props.style,
|
223
|
+
onMouseEnter: function onMouseEnter() {
|
224
|
+
return _this2.setState({
|
225
|
+
isHover: true
|
226
|
+
});
|
227
|
+
},
|
228
|
+
onMouseLeave: function onMouseLeave() {
|
229
|
+
return _this2.setState({
|
230
|
+
isHover: false
|
231
|
+
});
|
232
|
+
}
|
233
|
+
}, this.props.children), this.props.info && this.state.isHover ? /*#__PURE__*/React__default.createElement("span", {
|
234
|
+
style: {
|
235
|
+
position: 'absolute',
|
236
|
+
padding: '4px',
|
237
|
+
borderRadius: '4px',
|
238
|
+
backgroundColor: 'var(--primary-color)',
|
239
|
+
bottom: '-14px',
|
240
|
+
left: '50%',
|
241
|
+
transform: 'translate(-50%, 0)',
|
242
|
+
color: '#ffffff',
|
243
|
+
fontSize: '9px',
|
244
|
+
minWidth: "100%",
|
245
|
+
whiteSpace: "nowrap"
|
246
|
+
}
|
247
|
+
}, this.props.info) : null);
|
213
248
|
};
|
214
249
|
|
215
250
|
return ButtonIcon;
|