Skip to content

Commit

Permalink
Align data view icon usage (#56602)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster authored Nov 30, 2023
1 parent 615fc5b commit e557042
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions packages/edit-site/src/components/dataviews/view-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import {
import {
chevronRightSmall,
check,
blockTable,
formatListBullets,
arrowUp,
arrowDown,
grid,
category,
columns,
} from '@wordpress/icons';
import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -276,7 +276,11 @@ function SortMenu( { fields, view, onChangeView } ) {
);
}

const VIEW_TYPE_ICONS = { list: blockTable, grid, 'side-by-side': columns };
const VIEW_TYPE_ICONS = {
list: formatListBullets,
grid: category,
'side-by-side': columns,
};

export default function ViewActions( {
fields,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { page, columns, pullRight } from '@wordpress/icons';
import { formatListBullets, category, drawerLeft } from '@wordpress/icons';
import { privateApis as routerPrivateApis } from '@wordpress/router';
import { __experimentalHStack as HStack } from '@wordpress/components';

Expand All @@ -19,7 +19,11 @@ import { unlock } from '../../lock-unlock';
const { useLocation } = unlock( routerPrivateApis );

function getDataViewIcon( type ) {
const icons = { list: page, grid: columns, 'side-by-side': pullRight };
const icons = {
list: formatListBullets,
grid: category,
'side-by-side': drawerLeft,
};
return icons[ type ];
}

Expand Down

0 comments on commit e557042

Please sign in to comment.