This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +43
-10
lines changed Expand file tree Collapse file tree 2 files changed +43
-10
lines changed Original file line number Diff line number Diff line change 2
2
* External dependencies
3
3
*/
4
4
import { __ } from '@wordpress/i18n' ;
5
- import PropTypes from 'prop-types' ;
6
5
import { debounce } from '@woocommerce/base-utils' ;
7
6
import { Placeholder } from '@wordpress/components' ;
8
7
import { useBlockProps } from '@wordpress/block-editor' ;
8
+ import { EditorContainerBlockProps } from '@woocommerce/blocks/reviews/types' ;
9
9
10
10
/**
11
11
* Internal dependencies
@@ -18,7 +18,7 @@ const EditorContainerBlock = ( {
18
18
icon,
19
19
name,
20
20
noReviewsPlaceholder,
21
- } ) => {
21
+ } : EditorContainerBlockProps ) => {
22
22
const {
23
23
categoryIds,
24
24
productId,
@@ -70,12 +70,4 @@ const EditorContainerBlock = ( {
70
70
) ;
71
71
} ;
72
72
73
- EditorContainerBlock . propTypes = {
74
- attributes : PropTypes . object . isRequired ,
75
- icon : PropTypes . node . isRequired ,
76
- name : PropTypes . string . isRequired ,
77
- noReviewsPlaceholder : PropTypes . elementType . isRequired ,
78
- className : PropTypes . string ,
79
- } ;
80
-
81
73
export default EditorContainerBlock ;
Original file line number Diff line number Diff line change
1
+ export interface PreviewReviews {
2
+ id : number ;
3
+ date_created : string ;
4
+ formatted_date_created : string ;
5
+ date_created_gmt : string ;
6
+ product_id : number ;
7
+ product_name : string ;
8
+ product_permalink : string ;
9
+ reviewer : string ;
10
+ review : string ;
11
+ reviewer_avatar_urls : { [ id : number ] : string } ;
12
+ rating : number ;
13
+ verified : boolean ;
14
+ }
15
+
16
+ export interface Attributes {
17
+ categoryIds : number [ ] ;
18
+ editMode : boolean ;
19
+ imageType : string ;
20
+ orderby : string ;
21
+ productId : number ;
22
+ reviewsOnLoadMore : number ;
23
+ reviewsOnPageLoad : number ;
24
+ showLoadMore : boolean ;
25
+ showOrderby : boolean ;
26
+ showProductName : boolean ;
27
+ showReviewDate : boolean ;
28
+ showReviewerName : boolean ;
29
+ showReviewImage : boolean ;
30
+ showReviewRating : boolean ;
31
+ showReviewContent : boolean ;
32
+ previewReviews : PreviewReviews [ ] ;
33
+ }
34
+
35
+ export interface EditorContainerBlockProps {
36
+ attributes : Attributes ;
37
+ icon : JSX . Element ;
38
+ name : string ;
39
+ noReviewsPlaceholder : React . ReactNode ;
40
+ className ?: string ;
41
+ }
You can’t perform that action at this time.
0 commit comments