Added a placeholder to the product search block editor (https://github.com/woocommerce/woocommerce-blocks/pull/5122)

* Added a placeholder to the product search block editor to indicate that the user can change the placeholder on the front end

* Changed the placeholder to be translatable
This commit is contained in:
Alex Florisca 2021-11-12 14:58:30 +00:00 committed by GitHub
parent 5af0d7ddb9
commit 6946750ea3
1 changed files with 4 additions and 0 deletions

View File

@ -104,6 +104,10 @@ const Edit = ( {
<TextControl
className="wc-block-product-search__field input-control"
value={ placeholder }
placeholder={ __(
'Enter search placeholder text',
'woo-gutenberg-products-block'
) }
onChange={ ( value ) =>
setAttributes( { placeholder: value } )
}