Skip to content

Commit

Permalink
Add reusable block icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Jul 9, 2020
1 parent d3503d4 commit 61d4b05
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { hasBlockSupport, isReusableBlock } from '@wordpress/blocks';
import { withSelect, withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { BlockSettingsMenuControls } from '@wordpress/block-editor';
import { reusableBlock } from '@wordpress/icons';

export function ReusableBlockConvertButton( {
isVisible,
Expand All @@ -29,6 +30,7 @@ export function ReusableBlockConvertButton( {
<>
{ ! isReusable && (
<MenuItem
icon={ reusableBlock }
onClick={ () => {
onConvertToReusable();
onClose();
Expand Down
3 changes: 2 additions & 1 deletion packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export { default as audio } from './library/audio';
export { default as backup } from './library/backup';
export { default as blockDefault } from './library/block-default';
export { default as blockTable } from './library/block-table';
export { default as box } from './library/box';
export { default as brush } from './library/brush';
export { default as button } from './library/button';
export { default as calendar } from './library/calendar';
Expand Down Expand Up @@ -119,7 +120,6 @@ export { default as plusCircle } from './library/plus-circle';
export { default as plus } from './library/plus';
export { default as postList } from './library/post-list';
export { default as preformatted } from './library/preformatted';
export { default as box } from './library/box';
export { default as pullLeft } from './library/pull-left';
export { default as pullRight } from './library/pull-right';
export { default as pullquote } from './library/pullquote';
Expand All @@ -128,6 +128,7 @@ export { default as receipt } from './library/receipt';
export { default as redo } from './library/redo';
export { default as replace } from './library/replace';
export { default as resizeCornerNE } from './library/resize-corner-n-e';
export { default as reusableBlock } from './library/reusable-block';
export { default as rotateLeft } from './library/rotate-left';
export { default as rotateRight } from './library/rotate-right';
export { default as rss } from './library/rss';
Expand Down
12 changes: 12 additions & 0 deletions packages/icons/src/library/reusable-block.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const reusableBlock = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path d="M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z" />
</SVG>
);

export default reusableBlock;

0 comments on commit 61d4b05

Please sign in to comment.