This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into fix/7921-product-query-product-search-resul…
…t-preview
- Loading branch information
Showing
16 changed files
with
300 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "woocommerce/store-notices", | ||
"version": "1.0.0", | ||
"title": "Store Notices", | ||
"description": "Display shopper-facing notifications generated by WooCommerce or extensions.", | ||
"category": "woocommerce", | ||
"keywords": [ "WooCommerce" ], | ||
"supports": { | ||
"multiple": false | ||
}, | ||
"textdomain": "woo-gutenberg-products-block", | ||
"apiVersion": 2, | ||
"$schema": "https://schemas.wp.org/trunk/block.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { useBlockProps } from '@wordpress/block-editor'; | ||
import { __ } from '@wordpress/i18n'; | ||
import { Notice } from '@wordpress/components'; | ||
|
||
const Edit = (): JSX.Element => { | ||
const blockProps = useBlockProps( { | ||
className: 'wc-block-store-notices', | ||
} ); | ||
|
||
return ( | ||
<div { ...blockProps }> | ||
<Notice status="info" isDismissible={ false }> | ||
{ __( | ||
'Notices added by WooCommerce or extensions will show up here.', | ||
'woo-gutenberg-products-block' | ||
) } | ||
</Notice> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Edit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { registerBlockType } from '@wordpress/blocks'; | ||
import { Icon } from '@wordpress/icons'; | ||
import { totals } from '@woocommerce/icons'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import metadata from './block.json'; | ||
import edit from './edit'; | ||
|
||
registerBlockType( metadata, { | ||
icon: { | ||
src: ( | ||
<Icon | ||
icon={ totals } | ||
className="wc-block-editor-components-block-icon" | ||
/> | ||
), | ||
}, | ||
attributes: { | ||
...metadata.attributes, | ||
}, | ||
edit, | ||
save() { | ||
return null; | ||
}, | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { default as hasInState } from './has-in-state'; | ||
export { default as updateState } from './update-state'; | ||
export { default as processErrorResponse } from './process-error-response'; | ||
export * from './process-error-response'; |
Oops, something went wrong.