Change cursor for current display and prevent option from being selected

This commit is contained in:
Tiago Noronha 2018-03-15 15:07:09 +00:00
parent c5424350ab
commit f238cbbca0
5 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -222,6 +222,8 @@ p.wc-products-block-description {
}
&--current {
cursor: default;
.wc-products-display-options__option-title {
color: $color__option-description;
}

View File

@ -195,7 +195,7 @@ var ProductsBlockSettingsEditorDisplayOption = function (_React$Component) {
return wp.element.createElement(
'div',
{ className: classes, onClick: function onClick() {
_this2.props.update_display_callback(_this2.props.value);
_this2.props.current !== _this2.props.value && _this2.props.update_display_callback(_this2.props.value);
} },
wp.element.createElement(
'div',

View File

@ -83,7 +83,7 @@ class ProductsBlockSettingsEditorDisplayOption extends React.Component {
}
return (
<div className={ classes } onClick={ () => { this.props.update_display_callback( this.props.value ) } } >
<div className={ classes } onClick={ () => { this.props.current !== this.props.value && this.props.update_display_callback( this.props.value ) } } >
<div className="wc-products-display-options__option-content">
<span className="wc-products-display-options__option-title">{ this.props.title }</span>
<p className="wc-products-display-options__option-description">{ this.props.description }</p>