css
6 years ago
attributes.js
6 years ago
block-controls.js
6 years ago
block.js
6 years ago
edit.js
6 years ago
editor.scss
6 years ago
save.js
6 years ago
section-tag.js
6 years ago
style.scss
6 years ago
section-tag.js
21 lines
| 1 | const { createElement } = wp.element; |
| 2 | const { applyFilters } = wp.hooks; |
| 3 | |
| 4 | export default function Section( { attributes, tagName, id, className, style, children } ) { |
| 5 | if ( ! id ) { |
| 6 | id = null; |
| 7 | } |
| 8 | |
| 9 | const htmlAttributes = { |
| 10 | id: id, |
| 11 | className: className, |
| 12 | style: style, |
| 13 | }; |
| 14 | |
| 15 | return createElement( |
| 16 | tagName, |
| 17 | applyFilters( 'generateblocks.frontend.htmlAttributes', htmlAttributes, 'generateblocks/container', attributes ), |
| 18 | children |
| 19 | ); |
| 20 | } |
| 21 |