Skip to content

Commit 722acaa

Browse files
committed
Block modified
1 parent d914b99 commit 722acaa

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

js/msls-widget-block/index.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => '627848d7182ac425e62c');
1+
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'a9101bb0f0871597e200');

js/msls-widget-block/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/msls-widget-block/edit.js

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1+
import { __ } from '@wordpress/i18n';
12
import { useBlockProps } from '@wordpress/block-editor';
2-
import { ServerSideRender, TextControl } from '@wordpress/components';
33

4-
export default function edit() {
5-
const blockProps = useBlockProps();
4+
export default function Edit() {
65
return (
7-
<>
8-
<ServerSideRender
9-
block="lloc/msls-widget-block"
10-
attributes={blockProps.attributes}
11-
/>
12-
<InspectorControls>
13-
<TextControl
14-
label="Title"
15-
value={blockProps.attributes.title}
16-
onChange={(value) => {
17-
blockProps.setAttributes({ title: value });
18-
}}
19-
/>
20-
</InspectorControls>
21-
</>
6+
<p { ...useBlockProps() }>
7+
{ __(
8+
'Block with Dynamic Rendering – hello from the editor!',
9+
'multisite-language-switcher'
10+
) }
11+
</p>
2212
);
2313
}

0 commit comments

Comments
 (0)