Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Example: Controls block to use latest API. #157

Merged
merged 3 commits into from
Oct 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add block.json and assets file.
ryanwelcher committed Oct 19, 2021
commit 33702464c18f5f5d14c2a6c5466afa74466019cf
1 change: 1 addition & 0 deletions 04-controls/block.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-editor', ), 'version' => 'a35cc1c098b69994c9c6d6dc1416bb90');
27 changes: 27 additions & 0 deletions 04-controls/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"apiVersion": 2,
"name":"gutenberg-examples/example-04-controls",
"title": "Example: Controls",
"icon": "universal-access-alt",
"category": "layout",
"attributes": {
"content": {
"type": "array",
"source": "children",
"selector": "p"
},
"alignment": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cool to integrate Prettier formatting with this repository.

"type": "string",
"default": "none"
}
},
"example": {
"attributes": {
"content": "Hello world",
"alignment": "right"
}
},
"editorScript": "file:./block.js",
"editorStyle":"file:./editor.css",
"style":"file:./style.css"
}