ui-kit-ck-consultant 0.5.254 → 0.5.255

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.
@@ -191,22 +191,55 @@ var Button = /*#__PURE__*/function (_React$Component) {
191
191
  var ButtonIcon = /*#__PURE__*/function (_React$Component) {
192
192
  _inheritsLoose(ButtonIcon, _React$Component);
193
193
 
194
- function ButtonIcon() {
195
- return _React$Component.apply(this, arguments) || this;
194
+ function ButtonIcon(props) {
195
+ var _this;
196
+
197
+ _this = _React$Component.call(this, props) || this;
198
+ _this.state = {
199
+ isHover: false
200
+ };
201
+ return _this;
196
202
  }
197
203
 
198
204
  var _proto = ButtonIcon.prototype;
199
205
 
200
206
  _proto.render = function render() {
201
- var _classNames;
207
+ var _classNames,
208
+ _this2 = this;
202
209
 
203
210
  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));
204
- return /*#__PURE__*/React.createElement("button", {
211
+ return /*#__PURE__*/React.createElement("div", {
212
+ style: {
213
+ position: 'relative'
214
+ }
215
+ }, /*#__PURE__*/React.createElement("button", {
205
216
  className: buttonClass,
206
217
  onClick: this.props.onClick,
207
218
  disabled: this.props.disabled,
208
- style: this.props.style
209
- }, this.props.children);
219
+ style: this.props.style,
220
+ onMouseEnter: function onMouseEnter() {
221
+ return _this2.setState({
222
+ isHover: true
223
+ });
224
+ },
225
+ onMouseLeave: function onMouseLeave() {
226
+ return _this2.setState({
227
+ isHover: false
228
+ });
229
+ }
230
+ }, this.props.children), this.props.info && this.state.isHover ? /*#__PURE__*/React.createElement("span", {
231
+ style: {
232
+ position: 'absolute',
233
+ padding: '4px',
234
+ borderRadius: '4px',
235
+ backgroundColor: 'var(--primary-color)',
236
+ bottom: '-6px',
237
+ left: '50%',
238
+ transform: 'translate(-50%, 0)',
239
+ color: '#ffffff',
240
+ fontSize: '9px'
241
+ }
242
+ }, this.props.info) : null);
210
243
  };
211
244
 
212
245
  return ButtonIcon;