index.js
14 lines
| 1 | export function getContentAttribute( attributes, blockName ) { |
| 2 | let contentValue = ''; |
| 3 | |
| 4 | if ( 'generateblocks/button' === blockName ) { |
| 5 | contentValue = attributes.text; |
| 6 | } |
| 7 | |
| 8 | if ( 'generateblocks/headline' === blockName ) { |
| 9 | contentValue = attributes.content; |
| 10 | } |
| 11 | |
| 12 | return contentValue; |
| 13 | } |
| 14 |