Skip to content

Commit

Permalink
Use a generic inserter title from mobile inserters (#14493)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Mar 21, 2019
1 parent 8c51368 commit c7345ee
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/block-editor/src/components/inserter/index.js
Expand Up @@ -83,7 +83,7 @@ class Inserter extends Component {
}

render() {
const { position, title } = this.props;
const { position } = this.props;

return (
<Dropdown
Expand All @@ -92,7 +92,7 @@ class Inserter extends Component {
position={ position }
onToggle={ this.onToggle }
expandOnMobile
headerTitle={ title }
headerTitle={ __( 'Add a block' ) }
renderToggle={ this.renderToggle }
renderContent={ this.renderContent }
/>
Expand All @@ -102,18 +102,9 @@ class Inserter extends Component {

export default compose( [
withSelect( ( select, { rootClientId } ) => {
const {
hasInserterItems,
} = select( 'core/block-editor' );

// The title should be removed from the inserter
// or replaced by a prop passed to the inserter.
const {
getEditedPostAttribute,
} = select( 'core/editor' );
const { hasInserterItems } = select( 'core/block-editor' );

return {
title: getEditedPostAttribute( 'title' ),
hasItems: hasInserterItems( rootClientId ),
};
} ),
Expand Down

0 comments on commit c7345ee

Please sign in to comment.