Skip to content

Commit

Permalink
Heading block: show all levels in toolbar control.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Mar 9, 2020
1 parent 6066186 commit 0bc76c9
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions packages/block-library/src/heading/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import HeadingToolbar from './heading-toolbar';
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { PanelBody } from '@wordpress/components';
import { createBlock } from '@wordpress/blocks';
import {
AlignmentToolbar,
BlockControls,
InspectorControls,
RichText,
__experimentalUseColors,
__experimentalBlock as Block,
Expand All @@ -42,8 +40,8 @@ function HeadingEdit( { attributes, setAttributes, mergeBlocks, onReplace } ) {
<>
<BlockControls>
<HeadingToolbar
minLevel={ 2 }
maxLevel={ 5 }
minLevel={ 1 }
maxLevel={ 7 }
selectedLevel={ level }
onChange={ ( newLevel ) =>
setAttributes( { level: newLevel } )
Expand All @@ -56,20 +54,6 @@ function HeadingEdit( { attributes, setAttributes, mergeBlocks, onReplace } ) {
} }
/>
</BlockControls>
<InspectorControls>
<PanelBody title={ __( 'Heading settings' ) }>
<p>{ __( 'Level' ) }</p>
<HeadingToolbar
isCollapsed={ false }
minLevel={ 1 }
maxLevel={ 7 }
selectedLevel={ level }
onChange={ ( newLevel ) =>
setAttributes( { level: newLevel } )
}
/>
</PanelBody>
</InspectorControls>
{ InspectorControlsColorPanel }
<TextColor>
<RichText
Expand Down

0 comments on commit 0bc76c9

Please sign in to comment.