Skip to content

Commit

Permalink
fix: make "Manage Reusable Blocks" a link (#10454)
Browse files Browse the repository at this point in the history
* fix: make "Manage Reusable Blocks" a link

Fix #10009

* Move text alignment to the right
  • Loading branch information
tofumatt authored and gziolo committed Oct 10, 2018
1 parent 1349d23 commit f232447
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions packages/editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import scrollIntoView from 'dom-scroll-into-view';
*/
import { __ } from '@wordpress/i18n';
import { Component, findDOMNode, createRef } from '@wordpress/element';
import { withSpokenMessages, PanelBody, IconButton } from '@wordpress/components';
import { withSpokenMessages, PanelBody } from '@wordpress/components';
import { getCategories, isReusableBlock } from '@wordpress/blocks';
import { withDispatch, withSelect } from '@wordpress/data';
import { withInstanceId, compose, withSafeTimeout } from '@wordpress/compose';
Expand Down Expand Up @@ -286,12 +286,12 @@ export class InserterMenu extends Component {
ref={ this.bindPanel( 'reusable' ) }
>
<BlockTypesList items={ reusableItems } onSelect={ onSelect } onHover={ this.onHover } />
<IconButton
<a
className="editor-inserter__manage-reusable-blocks"
icon="admin-generic"
label={ __( 'Manage All Reusable Blocks' ) }
href="edit.php?post_type=wp_block"
/>
>
{ __( 'Manage All Reusable Blocks' ) }
</a>
</PanelBody>
) }
{ isEmpty( suggestedItems ) && isEmpty( reusableItems ) && isEmpty( itemsPerCategory ) && (
Expand Down
9 changes: 4 additions & 5 deletions packages/editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,11 @@ $block-inserter-search-height: 38px;

.editor-inserter__reusable-blocks-panel {
position: relative;
text-align: right;
}

.editor-inserter__manage-reusable-blocks {
bottom: 5px;
position: absolute;
right: 0;
}
.editor-inserter__manage-reusable-blocks {
margin: $grid-size-large 0 0 $grid-size-large;
}

.editor-inserter__no-results {
Expand Down

0 comments on commit f232447

Please sign in to comment.