Skip to content

Commit

Permalink
Add a Dropdown block for use in Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Jul 30, 2021
1 parent 23e3fc6 commit 91f4220
Show file tree
Hide file tree
Showing 17 changed files with 1,104 additions and 34 deletions.
2 changes: 2 additions & 0 deletions lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function gutenberg_reregister_core_block_types() {
'column',
'columns',
'cover',
'dropdown',
'gallery',
'group',
'heading',
Expand Down Expand Up @@ -53,6 +54,7 @@ function gutenberg_reregister_core_block_types() {
'block.php' => 'core/block',
'calendar.php' => 'core/calendar',
'categories.php' => 'core/categories',
'dropdown.php' => 'core/dropdown',
'file.php' => 'core/file',
'latest-comments.php' => 'core/latest-comments',
'latest-posts.php' => 'core/latest-posts',
Expand Down
64 changes: 64 additions & 0 deletions packages/block-library/src/dropdown/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"apiVersion": 2,
"name": "core/dropdown",
"title": "Dropdown",
"category": "design",
"parent": [
"core/navigation"
],
"description": "Add a submenu dropdown to your navigation.",
"textdomain": "default",
"attributes": {
"label": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"rel": {
"type": "string"
},
"id": {
"type": "number"
},
"opensInNewTab": {
"type": "boolean",
"default": false
},
"url": {
"type": "string"
},
"title": {
"type": "string"
},
"kind": {
"type": "string"
},
"isTopLevelItem": {
"type": "boolean"
}
},
"usesContext": [
"textColor",
"customTextColor",
"backgroundColor",
"customBackgroundColor",
"overlayTextColor",
"customOverlayTextColor",
"overlayBackgroundColor",
"customOverlayBackgroundColor",
"fontSize",
"customFontSize",
"showSubmenuIcon",
"style"
],
"supports": {
"reusable": false,
"html": false
},
"editorStyle": "wp-block-dropdown-editor",
"style": "wp-block-dropdown"
}
Loading

0 comments on commit 91f4220

Please sign in to comment.