Skip to content

Commit

Permalink
declare script in navigation's block.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente Canales committed Mar 5, 2021
1 parent 828e502 commit 37c43d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/block-library/src/navigation/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
"__experimentalTextDecoration": true
},
"editorStyle": "wp-block-navigation-editor",
"style": "wp-block-navigation"
"style": "wp-block-navigation",
"script": "file:./script.js"
}
1 change: 0 additions & 1 deletion packages/block-library/src/navigation/modals/index.js

This file was deleted.

3 changes: 3 additions & 0 deletions packages/block-library/src/navigation/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
console.log( 'This script has been loaded from a block.' );

export default {};

0 comments on commit 37c43d2

Please sign in to comment.