diff --git a/src/blocks/accordion/accordion-item/edit.js b/src/blocks/accordion/accordion-item/edit.js index 47917791..3ed6c139 100755 --- a/src/blocks/accordion/accordion-item/edit.js +++ b/src/blocks/accordion/accordion-item/edit.js @@ -76,7 +76,7 @@ class AccordionItem extends Component { ...this.props, } } key={ 'inspector' }/>
-
+
diff --git a/src/blocks/accordion/accordion-item/index.js b/src/blocks/accordion/accordion-item/index.js index be7b7645..555ec3a0 100755 --- a/src/blocks/accordion/accordion-item/index.js +++ b/src/blocks/accordion/accordion-item/index.js @@ -27,6 +27,7 @@ export default registerBlockType( category: 'getwid-blocks', parent: [ 'getwid/accordion' ], supports: { + anchor: true, multiple: true, reusable: false, html: false @@ -50,4 +51,4 @@ export default registerBlockType( }} /> ) } -); \ No newline at end of file +); diff --git a/src/blocks/accordion/accordion-item/save.js b/src/blocks/accordion/accordion-item/save.js index 1832febd..fa0a115e 100755 --- a/src/blocks/accordion/accordion-item/save.js +++ b/src/blocks/accordion/accordion-item/save.js @@ -18,7 +18,7 @@ class Save extends Component { render() { const {className, baseClass} = this.props; - const {outerParent, title} = this.props.attributes; + const {outerParent, title, anchor} = this.props.attributes; const Tag = outerParent ? outerParent.attributes.headerTag : 'span'; const iconOpen = outerParent ? outerParent.attributes.iconOpen : 'fas fa-minus'; @@ -26,7 +26,7 @@ class Save extends Component { return ( -
+
{title && ( @@ -52,4 +52,4 @@ class Save extends Component { } } -export default Save; \ No newline at end of file +export default Save; diff --git a/src/blocks/accordion/accordion/edit.js b/src/blocks/accordion/accordion/edit.js index 4b9270eb..764f2cc5 100755 --- a/src/blocks/accordion/accordion/edit.js +++ b/src/blocks/accordion/accordion/edit.js @@ -129,6 +129,7 @@ class Accordion extends Component { }, align ? `align${align}` : null )} + id={this.props.attributes.anchor} data-active-element={active != undefined ? active : '0'} > diff --git a/src/blocks/accordion/accordion/index.js b/src/blocks/accordion/accordion/index.js index 04ceb101..d1c5ebd2 100755 --- a/src/blocks/accordion/accordion/index.js +++ b/src/blocks/accordion/accordion/index.js @@ -37,6 +37,7 @@ export default registerBlockType( icon: , category: 'getwid-blocks', supports: { + anchor: true, align: [ 'wide', 'full' ], inserter: !Getwid.disabled_blocks.includes(blockName) }, diff --git a/src/blocks/accordion/accordion/save.js b/src/blocks/accordion/accordion/save.js index 97fe8cdf..719210fb 100755 --- a/src/blocks/accordion/accordion/save.js +++ b/src/blocks/accordion/accordion/save.js @@ -27,6 +27,7 @@ class Save extends Component { } = this.props; const { className } = this.props; + const { anchor } = this.props.attributes; return (
@@ -42,4 +44,4 @@ class Save extends Component { } } -export default Save; \ No newline at end of file +export default Save; diff --git a/src/blocks/toggle/toggle-item/attributes.js b/src/blocks/toggle/toggle-item/attributes.js index f16a1362..afce0411 100755 --- a/src/blocks/toggle/toggle-item/attributes.js +++ b/src/blocks/toggle/toggle-item/attributes.js @@ -13,4 +13,4 @@ const attributes = { }, }; -export default attributes; \ No newline at end of file +export default attributes; diff --git a/src/blocks/toggle/toggle-item/edit.js b/src/blocks/toggle/toggle-item/edit.js index a4126cbe..4096eb68 100755 --- a/src/blocks/toggle/toggle-item/edit.js +++ b/src/blocks/toggle/toggle-item/edit.js @@ -74,7 +74,7 @@ class ToggleItem extends Component { -
+
diff --git a/src/blocks/toggle/toggle-item/index.js b/src/blocks/toggle/toggle-item/index.js index 6ea8d130..5bf5c76b 100755 --- a/src/blocks/toggle/toggle-item/index.js +++ b/src/blocks/toggle/toggle-item/index.js @@ -27,6 +27,7 @@ export default registerBlockType( category: 'getwid-blocks', parent: [ 'getwid/toggle' ], supports: { + anchor: true, multiple: true, reusable: false, html: false @@ -57,4 +58,4 @@ export default registerBlockType( }} /> ) } -); \ No newline at end of file +); diff --git a/src/blocks/toggle/toggle-item/save.js b/src/blocks/toggle/toggle-item/save.js index c05955c8..b2806601 100755 --- a/src/blocks/toggle/toggle-item/save.js +++ b/src/blocks/toggle/toggle-item/save.js @@ -18,7 +18,7 @@ class Save extends Component { render() { const {className, baseClass} = this.props; - const {outerParent, title, active} = this.props.attributes; + const {outerParent, title, active, anchor} = this.props.attributes; const Tag = outerParent ? outerParent.attributes.headerTag : 'span'; const iconOpen = outerParent ? outerParent.attributes.iconOpen : 'fas fa-minus'; @@ -30,6 +30,7 @@ class Save extends Component { 'is-active': active, }, )} + id={anchor} >
, category: 'getwid-blocks', supports: { + anchor: true, align: [ 'wide', 'full' ], inserter: !Getwid.disabled_blocks.includes(blockName) }, diff --git a/src/blocks/toggle/toggle/save.js b/src/blocks/toggle/toggle/save.js index d76737da..8b484b31 100755 --- a/src/blocks/toggle/toggle/save.js +++ b/src/blocks/toggle/toggle/save.js @@ -25,11 +25,13 @@ class Save extends Component { } = this.props; const { className } = this.props; + const { anchor } = this.props.attributes; return (
@@ -37,4 +39,4 @@ class Save extends Component { } } -export default Save; \ No newline at end of file +export default Save;