Skip to content

Commit 4a0bdae

Browse files
committed
fix: edit js blockprops
1 parent 1343b64 commit 4a0bdae

5 files changed

Lines changed: 7 additions & 29 deletions

File tree

src/faq-answer/block.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"version": "2.0.3",
66
"title": "FAQ Answer",
77
"category": "design",
8-
"parent": [
9-
"blockparty/faq-item"
10-
],
8+
"parent": [ "blockparty/faq-item" ],
119
"description": "Content of the FAQ answer.",
1210
"supports": {
1311
"html": false,

src/faq-item/block.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"version": "2.0.3",
66
"title": "FAQ Item",
77
"category": "design",
8-
"parent": [
9-
"blockparty/faq"
10-
],
8+
"parent": [ "blockparty/faq" ],
119
"description": "A FAQ item containing a question and an answer.",
1210
"supports": {
1311
"html": false,

src/faq-item/edit.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ export default function Edit( { clientId } ) {
7070
/>
7171
</ToolbarGroup>
7272
</BlockControls>
73-
<div { ...useBlockProps() }>
74-
<div { ...innerBlocksProps } />
75-
</div>
73+
<div { ...innerBlocksProps } />
7674
</>
7775
);
7876
}

src/faq-question/block.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
"version": "2.0.3",
66
"title": "FAQ Question",
77
"category": "design",
8-
"parent": [
9-
"blockparty/faq-item"
10-
],
8+
"parent": [ "blockparty/faq-item" ],
119
"description": "Content of the FAQ question.",
12-
"usesContext": [
13-
"blockparty/headingLevel"
14-
],
10+
"usesContext": [ "blockparty/headingLevel" ],
1511
"supports": {
1612
"html": false,
1713
"inserter": false,
@@ -32,13 +28,7 @@
3228
"headingLevel": {
3329
"type": "number",
3430
"default": 3,
35-
"enum": [
36-
2,
37-
3,
38-
4,
39-
5,
40-
6
41-
]
31+
"enum": [ 2, 3, 4, 5, 6 ]
4232
}
4333
},
4434
"textdomain": "blockparty-faq",

src/faq/block.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
"headingLevel": {
1919
"type": "number",
2020
"default": 3,
21-
"enum": [
22-
2,
23-
3,
24-
4,
25-
5,
26-
6
27-
]
21+
"enum": [ 2, 3, 4, 5, 6 ]
2822
}
2923
},
3024
"providesContext": {

0 commit comments

Comments
 (0)