Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix/onsplit' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
admturner committed Jul 17, 2024
2 parents 5e6d91a + 8814cef commit f4b44c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
20 changes: 15 additions & 5 deletions src/blocks/button/block.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"apiVersion": 2,
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "hrswp/button",
"title": "Button",
"category": "design",
Expand Down Expand Up @@ -55,14 +56,23 @@
},
"supports": {
"anchor": true,
"splitting": true,
"align": true,
"alignWide": false,
"color": false,
"typography": false,
"color": {
"gradients": false,
"background": false,
"text": false
},
"typography": {
"fontSize": false,
"lineHeight": false,
"textAlign": false
},
"reusable": false,
"spacing": false,
"spacing": {},
"__experimentalBorder": false,
"__experimentalSelector": ".wp-block-button__link"
"__experimentalSelector": ".wp-block-button .wp-block-button__link"
},
"styles": [
{ "name": "fill", "label": "Fill", "isDefault": true },
Expand Down
7 changes: 0 additions & 7 deletions src/blocks/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
__experimentalLinkControl as LinkControl,
} from '@wordpress/block-editor';
import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
import { createBlock } from '@wordpress/blocks';

/**
* Internal dependencies
Expand Down Expand Up @@ -183,12 +182,6 @@ function ButtonEdit( props ) {
...colorProps.style,
...spacingProps.style,
} }
onSplit={ ( value ) =>
createBlock( 'hrswp/button', {
...attributes,
text: value,
} )
}
onReplace={ onReplace }
onMerge={ mergeBlocks }
identifier="text"
Expand Down

0 comments on commit f4b44c9

Please sign in to comment.