Skip to content

Commit

Permalink
Add general slot for items applying to block as a whole
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Oct 31, 2022
1 parent a5bccec commit 186276f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
<div className="block-editor-block-inspector">
<BlockCard { ...blockInformation } />
<BlockVariationTransforms blockClientId={ clientId } />
<InspectorControls.Slot __experimentalGroup="general" />
{ showTabs && (
<InspectorControlsTabs
hasBlockStyles={ hasBlockStyles }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ const InspectorControlsTypography = createSlotFill(
'InspectorControlsTypography'
);

// The general group is intended to render fills relevant to a block as a whole.
// As such, they will normally be rendered outside the block inspector's tabs.
const InspectorControlsGeneral = createSlotFill( 'InspectorControlsGeneral' );

const groups = {
default: InspectorControlsDefault,
advanced: InspectorControlsAdvanced,
border: InspectorControlsBorder,
color: InspectorControlsColor,
dimensions: InspectorControlsDimensions,
general: InspectorControlsGeneral,
typography: InspectorControlsTypography,
};

Expand Down

0 comments on commit 186276f

Please sign in to comment.