Skip to content

Commit

Permalink
Block bindings: Change bindings panel title, add description. (#62489)
Browse files Browse the repository at this point in the history
* Change title, add description

* Update description

* Update description

Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
4 people authored and ellatrix committed Jun 18, 2024
1 parent a3e5a5c commit 4d5ae89
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions packages/block-editor/src/hooks/block-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { __ } from '@wordpress/i18n';
import { store as blocksStore } from '@wordpress/blocks';
import {
BaseControl,
PanelBody,
__experimentalHStack as HStack,
__experimentalItemGroup as ItemGroup,
Expand Down Expand Up @@ -54,30 +55,35 @@ export const BlockBindingsPanel = ( { name, metadata } ) => {
return (
<InspectorControls>
<PanelBody
title={ __( 'Bindings' ) }
title={ __( 'Attributes' ) }
className="components-panel__block-bindings-panel"
>
<ItemGroup isBordered isSeparated size="large">
{ Object.keys( filteredBindings ).map( ( key ) => {
return (
<Item key={ key }>
<HStack>
<span>{ key }</span>
<span className="components-item__block-bindings-source">
{ sources[
filteredBindings[ key ].source
]
? sources[
filteredBindings[ key ]
.source
].label
: filteredBindings[ key ].source }
</span>
</HStack>
</Item>
);
} ) }
</ItemGroup>
<BaseControl
help={ __( 'Attributes connected to various sources.' ) }
>
<ItemGroup isBordered isSeparated size="large">
{ Object.keys( filteredBindings ).map( ( key ) => {
return (
<Item key={ key }>
<HStack>
<span>{ key }</span>
<span className="components-item__block-bindings-source">
{ sources[
filteredBindings[ key ].source
]
? sources[
filteredBindings[ key ]
.source
].label
: filteredBindings[ key ]
.source }
</span>
</HStack>
</Item>
);
} ) }
</ItemGroup>
</BaseControl>
</PanelBody>
</InspectorControls>
);
Expand Down

0 comments on commit 4d5ae89

Please sign in to comment.