| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
import { registerBlockType } from '@wordpress/blocks'; |
| 3 |
import { useBlockProps } from '@wordpress/block-editor'; |
| 4 |
import { InnerBlocks } from "@wordpress/block-editor"; |
| 5 |
|
| 6 |
registerBlockType( 'friends/message', { |
| 7 |
apiVersion: 2, |
| 8 |
edit: function() { |
| 9 |
return ( |
| 10 |
<div { ...useBlockProps() }> |
| 11 |
<InnerBlocks /> |
| 12 |
</div> |
| 13 |
); |
| 14 |
}, |
| 15 |
save: () => { |
| 16 |
const blockProps = useBlockProps.save(); |
| 17 |
|
| 18 |
return ( |
| 19 |
<div { ...blockProps }> |
| 20 |
<InnerBlocks.Content /> |
| 21 |
</div> |
| 22 |
); |
| 23 |
}, |
| 24 |
} ); |
| 25 |
|