Skip to content

Commit

Permalink
Add Gutenberg 8 arguments to ServerSideRender
Browse files Browse the repository at this point in the history
  • Loading branch information
lipemat committed Aug 20, 2020
1 parent 3fd1e68 commit 5e362d8
Show file tree
Hide file tree
Showing 3 changed files with 882 additions and 1,574 deletions.
6 changes: 4 additions & 2 deletions @types/wordpress__components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,12 @@ declare module '@wordpress/components' {
hideLabelFromVision?: boolean
}

export interface ServerSideRender {
export interface ServerSideRender<A = object, U = object> {
block: string;
attributes?: object;
attributes?: A;
className?: string;
httpMethod?: 'GET' | 'POST'
urlQueryArgs?: U
}

interface Shortcut extends HTMLSpanElement {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@lipemat/js-boilerplate": ">=5.4.2",
"@wordpress/api-fetch": "^3.11.0",
"@wordpress/api-fetch": "^3.18.0",
"microbundle": "^0.12.3",
"unfetch": "^4.1.0"
},
Expand Down
Loading

0 comments on commit 5e362d8

Please sign in to comment.