Skip to content

Commit

Permalink
Fade the value selection field in the Attributes modal when no attrib…
Browse files Browse the repository at this point in the history
…ute is added (woocommerce#35700)

* Fade the value selection field in the Attributes modal when no attribute is added

* Fix linter errors
  • Loading branch information
mdperez86 authored Nov 24, 2022
1 parent ee0a21e commit 3ff334b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/js/components/changelog/enhancement-35568
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: enhancement

Fade the value selection field in the Attributes modal when no attribute is added
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
> * {
display: inline-flex;
}

&--disabled {
opacity: 0.5;
}
}

.woocommerce-experimental-select-control__combox-box {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import { createElement, MouseEvent, useRef } from 'react';
import { Icon, search } from '@wordpress/icons';
import classNames from 'classnames';

/**
* Internal dependencies
Expand Down Expand Up @@ -40,7 +41,13 @@ export const ComboBox = ( {
// Keyboard users are still able to tab to and interact with elements in the combobox.
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
<div
className="woocommerce-experimental-select-control__combo-box-wrapper"
className={ classNames(
'woocommerce-experimental-select-control__combo-box-wrapper',
{
'woocommerce-experimental-select-control__combo-box-wrapper--disabled':
inputProps.disabled,
}
) }
onMouseDown={ maybeFocusInput }
>
{ children }
Expand Down

0 comments on commit 3ff334b

Please sign in to comment.