Skip to content

Commit

Permalink
Revise classnames and structure, add styles
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiomorales committed May 9, 2024
1 parent c5dd1b7 commit d027814
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ export const BindingsPanel = ( { block } ) => {
);

return (
<PanelBody title={ __( 'Bindings' ) }>
<PanelBody
title={ __( 'Bindings' ) }
className="components-panel__block-bindings-panel"
>
<ItemGroup isBordered isSeparated size="large">
{ Object.keys( bindings ).map( ( key, index ) => {
return (
<Item key={ index }>
<div>
{ key } :{ ' ' }
<span>{ key }</span>
<span className="components-item__block-bindings-source">
{ sources[ bindings[ key ].source ].label }
</div>
</span>
</Item>
);
} ) }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.components-panel__block-bindings-panel {

.components-item {
display: flex;
justify-content: space-between;

.components-item__block-bindings-source {
color: $gray-700;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import BlockQuickNavigation from '../block-quick-navigation';
import { useBorderPanelLabel } from '../../hooks/border';

import { unlock } from '../../lock-unlock';
import { BindingsPanel } from '../inspector-controls/bindings-panel';
import { BindingsPanel } from '../block-bindings-panel';

function BlockInspectorLockedBlocks( { topLevelLockedBlock } ) {
const contentClientIds = useSelect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AdvancedControls from './advanced-controls-panel';
import PositionControls from './position-controls-panel';
import { default as InspectorControls } from '../inspector-controls';
import SettingsTabHint from './settings-tab-hint';
import { BindingsPanel } from '../inspector-controls/bindings-panel';
import { BindingsPanel } from '../block-bindings-panel';

function SettingsTab( { showAdvancedControls = false, block } ) {
const hasBindings = block?.attributes?.metadata?.bindings
Expand Down
1 change: 1 addition & 0 deletions packages/block-editor/src/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "./autocompleters/style.scss";
@import "./components/block-alignment-control/style.scss";
@import "./components/block-bindings-panel/style.scss";
@import "./components/block-bindings-toolbar-indicator/style.scss";
@import "./components/block-canvas/style.scss";
@import "./components/block-icon/style.scss";
Expand Down

0 comments on commit d027814

Please sign in to comment.