Skip to content

Commit

Permalink
Add styles group to match default in settings tab
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jan 19, 2023
1 parent f075f49 commit 0385140
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
group="border"
label={ __( 'Border' ) }
/>
<InspectorControls.Slot group="styles" />
</>
) }
</div>
Expand Down Expand Up @@ -378,6 +379,7 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
group="border"
label={ __( 'Border' ) }
/>
<InspectorControls.Slot group="styles" />
<PositionControls />
<div>
<AdvancedControls />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const StylesTab = ( { blockName, clientId, hasBlockStyles } ) => {
label={ __( 'Dimensions' ) }
/>
<InspectorControls.Slot group="border" label={ __( 'Border' ) } />
<InspectorControls.Slot group="styles" />
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function useInspectorControlsTabs( blockName ) {
dimensions: dimensionsGroup,
list: listGroup,
position: positionGroup,
styles: stylesGroup,
typography: typographyGroup,
} = InspectorControlsGroups;

Expand All @@ -55,6 +56,7 @@ export default function useInspectorControlsTabs( blockName ) {
...( useSlotFills( borderGroup.Slot.__unstableName ) || [] ),
...( useSlotFills( colorGroup.Slot.__unstableName ) || [] ),
...( useSlotFills( dimensionsGroup.Slot.__unstableName ) || [] ),
...( useSlotFills( stylesGroup.Slot.__unstableName ) || [] ),
...( useSlotFills( typographyGroup.Slot.__unstableName ) || [] ),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const InspectorControlsTypography = createSlotFill(
'InspectorControlsTypography'
);
const InspectorControlsListView = createSlotFill( 'InspectorControlsListView' );
const InspectorControlsStyles = createSlotFill( 'InspectorControlsStyles' );

const groups = {
default: InspectorControlsDefault,
Expand All @@ -23,6 +24,7 @@ const groups = {
color: InspectorControlsColor,
dimensions: InspectorControlsDimensions,
list: InspectorControlsListView,
styles: InspectorControlsStyles,
typography: InspectorControlsTypography,
position: InspectorControlsPosition,
};
Expand Down

0 comments on commit 0385140

Please sign in to comment.