Skip to content

Commit

Permalink
Adds and applies Group icon
Browse files Browse the repository at this point in the history
As provided here #14908 (comment)
  • Loading branch information
getdave committed Apr 12, 2019
1 parent 0856ab6 commit f861f73
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import { switchToBlockType } from '@wordpress/blocks';
import { withSelect, withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';

/**
* Internal dependencies
*/
import { Group } from './icons';

export function ConvertToGroupButton( {
onConvertToGroup,
isVisible = true,
Expand All @@ -25,7 +30,7 @@ export function ConvertToGroupButton( {
<Fragment>
<MenuItem
className="editor-block-settings-menu__control block-editor-block-settings-menu__control"
icon="controls-repeat"
icon={ Group }
onClick={ onConvertToGroup }
>
{ __( 'Group' ) }
Expand Down
13 changes: 13 additions & 0 deletions packages/editor/src/components/convert-to-group-buttons/icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* WordPress dependencies
*/
import { Icon, SVG, Path } from '@wordpress/components';

const GroupSVG = <SVG width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<Path fillRule="evenodd" clipRule="evenodd" d="M10 4H18C19.1 4 20 4.9 20 6V14C20 15.1 19.1 16 18 16H10C8.9 16 8 15.1 8 14V6C8 4.9 8.9 4 10 4ZM10 14H18V6H10V14Z"
fill="#000" />
<Path d="M6 8C4.9 8 4 8.9 4 10V18C4 19.1 4.9 20 6 20H14C15.1 20 16 19.1 16 18H6V8Z"
fill="#000" />
</SVG>;

export const Group = <Icon icon={ GroupSVG } />;

0 comments on commit f861f73

Please sign in to comment.