@vtex/styleguide
Advanced tools
Comparing version 2.0.0-rc.28 to 2.0.0-rc.29
@@ -91,3 +91,3 @@ 'use strict'; | ||
if (secondary && !disabled) { | ||
classes += 'b--blue blue hover-white '; | ||
classes += 'bg-white b--blue blue hover-white '; | ||
} | ||
@@ -94,0 +94,0 @@ if (secondary && !isLoading) { |
@@ -37,8 +37,12 @@ 'use strict'; | ||
_this.setSelectRef = function (el) { | ||
_this.select = el; | ||
}; | ||
_this.handleClickOutside = function (e) { | ||
// TODO: fix | ||
// if (this.wrapperRef && !this.wrapperRef.contains(e.target)) { | ||
// this.props.onClose && this.props.onClose(e) | ||
// this.setState({ open: false }) | ||
// } | ||
if (_this.wrapperRef && !_this.wrapperRef.contains(e.target)) { | ||
_this.setState({ open: false }, function () { | ||
_this.props.onClose && _this.props.onClose(e); | ||
}); | ||
} | ||
}; | ||
@@ -70,10 +74,2 @@ | ||
_this.getButtonClass = function () { | ||
if (_this.props.disabled) { | ||
return 'pa4 bn br2 bg-light-gray gray'; | ||
} | ||
var textColor = _this.state.selectedValue ? 'near-black' : 'gray'; | ||
return 'pa4 ba bw1 br2 ' + textColor + ' bg-white b--near-white hover-bg-near-white hover-blue'; | ||
}; | ||
_this.state = { | ||
@@ -119,8 +115,5 @@ open: false | ||
disabled: disabled, | ||
ref: function ref(el) { | ||
return _this2.select = el; | ||
}, | ||
className: this.getButtonClass(), | ||
ref: this.setSelectRef, | ||
onClick: this.handleClick, | ||
style: { outline: 'none', height: '44px' } | ||
className: this.props.disabled ? 'pa4 bn br2 bg-light-silver gray' : 'pa4 ba bw1 br2 bg-white b--light-gray hover-bg-near-white hover-blue hover-b--near-white ' + (value ? 'near-black' : 'gray') | ||
}, | ||
@@ -162,10 +155,5 @@ _react2.default.createElement( | ||
key: option, | ||
className: 'flex w-100 right pa4 hover-bg-near-white near-black tl', | ||
className: 'flex w-100 pa4 bg-white hover-bg-near-white near-black tl bt-0 bl-0 br-0 bb b--near-white', | ||
onClick: function onClick(e) { | ||
return _this2.handleOptionClick(e, option); | ||
}, | ||
style: { | ||
height: '44px', | ||
border: '0px', | ||
borderBottom: '1px solid #F5F7FA' | ||
} | ||
@@ -172,0 +160,0 @@ }, |
{ | ||
"name": "@vtex/styleguide", | ||
"version": "2.0.0-rc.28", | ||
"version": "2.0.0-rc.29", | ||
"scripts": { | ||
@@ -14,3 +14,3 @@ "test": "react-scripts test --env=jsdom", | ||
"cleanlib": "rm -rf lib", | ||
"prepublishOnly": "npm run compile", | ||
"prepublishOnly": "npm run compile && npm run deploy", | ||
"develop": "npm link && watch 'npm run compile' src" | ||
@@ -17,0 +17,0 @@ }, |
63445
18
1300