Skip to content

Commit

Permalink
Update grid icon. (#25285)
Browse files Browse the repository at this point in the history
* Update grid icon.

* Remove icon usage.
  • Loading branch information
jasmussen authored Sep 14, 2020
1 parent e333f39 commit e3c36ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { some } from 'lodash';
*/
import { useSelect } from '@wordpress/data';
import { PanelBody } from '@wordpress/components';
import { page, layout, grid, blockDefault } from '@wordpress/icons';
import { page, layout } from '@wordpress/icons';

/**
* Internal dependencies
Expand All @@ -18,8 +18,6 @@ import EntityRecordItem from './entity-record-item';
const ENTITY_NAME_ICONS = {
site: layout,
page,
post: grid,
wp_template: grid,
};

export default function EntityTypeList( {
Expand All @@ -37,7 +35,7 @@ export default function EntityTypeList( {

// Set icon based on type of entity.
const { name } = firstRecord;
const icon = ENTITY_NAME_ICONS[ name ] || blockDefault;
const icon = ENTITY_NAME_ICONS[ name ];

return (
<PanelBody title={ entity.label } initialOpen={ true } icon={ icon }>
Expand Down
8 changes: 6 additions & 2 deletions packages/icons/src/library/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
import { SVG, Path } from '@wordpress/primitives';

const grid = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24">
<Path d="M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z" />
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z"
fillRule="evenodd"
clipRule="evenodd"
/>
</SVG>
);

Expand Down

0 comments on commit e3c36ae

Please sign in to comment.