Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Style the dropdown option
Browse files Browse the repository at this point in the history
  • Loading branch information
albarin committed Aug 19, 2022
1 parent f61bbc8 commit f286363
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 19 deletions.
38 changes: 19 additions & 19 deletions assets/js/blocks/attribute-filter/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ const AttributeFilterBlock = ( {
disabled={ isDisabled }
placeholder={ sprintf(
/* translators: %s attribute name. */
__( 'Any %s', 'woo-gutenberg-products-block' ),
__( 'Select %s', 'woo-gutenberg-products-block' ),
attributeObject.label
) }
onChange={ ( tokens: string[] ) => {
Expand Down Expand Up @@ -611,24 +611,24 @@ const AttributeFilterBlock = ( {
isDisabled={ isDisabled }
/>
) }
<div className="wc-block-attribute-filter__actions">
{ checked.length > 0 && (
<FilterResetButton
onClick={ () => setChecked( [] ) }
screenReaderLabel={ __(
'Reset stock filter',
'woo-gutenberg-products-block'
) }
/>
) }
{ blockAttributes.showFilterButton && (
<FilterSubmitButton
className="wc-block-stock-filter__button"
disabled={ isLoading || isDisabled }
onClick={ () => onSubmit( checked ) }
/>
) }
</div>
</div>
<div className="wc-block-attribute-filter__actions">
{ checked.length > 0 && (
<FilterResetButton
onClick={ () => setChecked( [] ) }
screenReaderLabel={ __(
'Reset stock filter',
'woo-gutenberg-products-block'
) }
/>
) }
{ blockAttributes.showFilterButton && (
<FilterSubmitButton
className="wc-block-stock-filter__button"
disabled={ isLoading || isDisabled }
onClick={ () => onSubmit( checked ) }
/>
) }
</div>
</>
);
Expand Down
24 changes: 24 additions & 0 deletions assets/js/blocks/attribute-filter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@
opacity: 0.6;
}

.wc-blocks-components-form-token-field-wrapper .components-form-token-field__input-container {
border: 1px solid $gray-700;
border-radius: 4px;
padding: $gap-smaller;

.components-form-token-field__input::placeholder {
color: $black;
}

.components-form-token-field__suggestions-list {
border: 1px solid $gray-700;
border-radius: 4px;
margin-top: $gap-smaller;
max-height: 21em;

.components-form-token-field__suggestion {
color: $black;
border: 1px solid $gray-400;
border-radius: 4px;
margin: $gap-small;
padding: $gap-small;
}
}
}
}

.wc-block-attribute-filter__multiple-toggle,
Expand Down

0 comments on commit f286363

Please sign in to comment.