Skip to content

Commit

Permalink
Add new check and reset icons
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Sep 10, 2021
1 parent 137a52c commit 72cf4a7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { check, minus, moreVertical } from '@wordpress/icons';
import { checkSmall, reset, moreVertical } from '@wordpress/icons';
import { __, sprintf } from '@wordpress/i18n';

/**
Expand All @@ -21,7 +21,7 @@ const DefaultControlsGroup = ( { items, onClose, toggleItem } ) => {
return (
<MenuGroup>
{ items.map( ( [ label, hasValue ] ) => {
const icon = hasValue ? minus : check;
const icon = hasValue ? reset : checkSmall;
const itemLabel = hasValue
? sprintf(
// translators: %s: The name of the control being reset e.g. "Padding".
Expand Down Expand Up @@ -74,7 +74,7 @@ const OptionalControlsGroup = ( { items, onClose, toggleItem } ) => {
return (
<MenuItem
key={ label }
icon={ isSelected && check }
icon={ isSelected && checkSmall }
isSelected={ isSelected }
label={ itemLabel }
onClick={ () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export { default as captureVideo } from './library/capture-video';
export { default as category } from './library/category';
export { default as chartBar } from './library/chart-bar';
export { default as check } from './library/check';
export { default as checkSmall } from './library/check-small';
export { default as chevronDown } from './library/chevron-down';
export { default as chevronLeft } from './library/chevron-left';
export { default as chevronRight } from './library/chevron-right';
Expand Down Expand Up @@ -172,6 +173,7 @@ export { default as receipt } from './library/receipt';
export { default as redo } from './library/redo';
export { default as removeBug } from './library/remove-bug';
export { default as replace } from './library/replace';
export { default as reset } from './library/reset';
export { default as resizeCornerNE } from './library/resize-corner-n-e';
export { default as reusableBlock } from './library/reusable-block';
export { default as symbol } from './library/symbol';
Expand Down
12 changes: 12 additions & 0 deletions packages/icons/src/library/check-small.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const checkSmall = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" />
</SVG>
);

export default checkSmall;
12 changes: 12 additions & 0 deletions packages/icons/src/library/reset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

const reset = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path d="M7 11.5h10V13H7z" />
</SVG>
);

export default reset;

0 comments on commit 72cf4a7

Please sign in to comment.