Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add new icon for mini cart block (inserter).
Browse files Browse the repository at this point in the history
See #6617.
  • Loading branch information
danielwrobert committed Jul 29, 2022
1 parent 4eed41d commit e260fb4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/blocks/mini-cart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { cart } from '@woocommerce/icons';
import { miniCartAlt } from '@woocommerce/icons';
import { Icon } from '@wordpress/icons';
import { registerBlockType } from '@wordpress/blocks';
import type { BlockConfiguration } from '@wordpress/blocks';
Expand All @@ -19,7 +19,7 @@ const settings: BlockConfiguration = {
icon: {
src: (
<Icon
icon={ cart }
icon={ miniCartAlt }
className="wc-block-editor-components-block-icon"
/>
),
Expand Down
1 change: 1 addition & 0 deletions assets/js/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export { default as toggle } from './library/toggle';
export { default as totals } from './library/totals';
export { default as woo } from './library/woo';
export { default as miniCart } from './library/mini-cart';
export { default as miniCartAlt } from './library/mini-cart-alt';
24 changes: 24 additions & 0 deletions assets/js/icons/library/mini-cart-alt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* External dependencies
*/
import { SVG } from '@wordpress/primitives';

const miniCartAlt = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
<mask id="path-1-inside-1_928_1005" fill="white">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M4 5V6.5H5.5L8.2 12.1925L7.1875 14.0225C6.64 15.0275 7.36 16.25 8.5 16.25H17.5V14.75H8.5L9.325 13.25H14.9125C15.475 13.25 15.97 12.9425 16.225 12.4775L18.91 7.61C19.1875 7.115 18.8275 6.5 18.2575 6.5H7.1575L6.4525 5H4ZM8.50001 17C7.67501 17 7.00751 17.675 7.00751 18.5C7.00751 19.325 7.67501 20 8.50001 20C9.32501 20 10 19.325 10 18.5C10 17.675 9.32501 17 8.50001 17ZM14.5075 18.5C14.5075 17.675 15.175 17 16 17C16.825 17 17.5 17.675 17.5 18.5C17.5 19.325 16.825 20 16 20C15.175 20 14.5075 19.325 14.5075 18.5Z"
/>
</mask>
<path
d="M4 6.5H2.5V8H4V6.5ZM4 5V3.5H2.5V5H4ZM5.5 6.5L6.85528 5.85718L6.44871 5H5.5V6.5ZM8.2 12.1925L9.5125 12.9187L9.88515 12.2452L9.55528 11.5497L8.2 12.1925ZM7.1875 14.0225L5.87497 13.2963L5.87028 13.3049L7.1875 14.0225ZM17.5 16.25V17.75H19V16.25H17.5ZM17.5 14.75H19V13.25H17.5V14.75ZM8.5 14.75L7.18568 14.0271L5.96309 16.25H8.5V14.75ZM9.325 13.25V11.75H8.43809L8.01068 12.5271L9.325 13.25ZM16.225 12.4775L14.9116 11.753L14.9098 11.7563L16.225 12.4775ZM18.91 7.61L17.6015 6.87648L17.5966 6.88549L18.91 7.61ZM7.1575 6.5L5.79996 7.13804L6.20508 8H7.1575V6.5ZM6.4525 5L7.81004 4.36196L7.40491 3.5H6.4525V5ZM5.5 6.5V5H2.5V6.5H5.5ZM5.5 5H4V8H5.5V5ZM9.55528 11.5497L6.85528 5.85718L4.14472 7.14282L6.84472 12.8353L9.55528 11.5497ZM8.5 14.7487L9.5125 12.9187L6.8875 11.4663L5.875 13.2963L8.5 14.7487ZM8.5 14.75C8.49588 14.75 8.49369 14.7497 8.49316 14.7497C8.49262 14.7496 8.49311 14.7496 8.49439 14.75C8.49728 14.7508 8.50057 14.7522 8.50336 14.7538C8.5059 14.7553 8.50678 14.7563 8.50641 14.7559C8.50595 14.7555 8.50471 14.7541 8.50333 14.7517C8.50196 14.7494 8.5011 14.7472 8.50067 14.7458C8.50027 14.7444 8.50045 14.7444 8.5005 14.7458C8.50055 14.7474 8.50034 14.7492 8.5001 14.7502C8.50002 14.7505 8.5001 14.7501 8.50063 14.7487C8.50116 14.7473 8.50235 14.7444 8.50472 14.7401L5.87028 13.3049C4.785 15.2971 6.20768 17.75 8.5 17.75V14.75ZM17.5 14.75H8.5V17.75H17.5V14.75ZM16 14.75V16.25H19V14.75H16ZM8.5 16.25H17.5V13.25H8.5V16.25ZM8.01068 12.5271L7.18568 14.0271L9.81432 15.4729L10.6393 13.9729L8.01068 12.5271ZM14.9125 11.75H9.325V14.75H14.9125V11.75ZM14.9098 11.7563C14.912 11.7522 14.914 11.7508 14.9147 11.7505C14.9153 11.7501 14.9159 11.7499 14.9163 11.7498C14.9169 11.7496 14.916 11.75 14.9125 11.75V14.75C16.0319 14.75 17.0263 14.1358 17.5402 13.1987L14.9098 11.7563ZM17.5966 6.88549L14.9116 11.753L17.5384 13.202L20.2234 8.33451L17.5966 6.88549ZM18.2575 8C17.6846 8 17.3169 7.3843 17.6016 6.87649L20.2184 8.34351C21.0581 6.8457 19.9704 5 18.2575 5V8ZM7.1575 8H18.2575V5H7.1575V8ZM5.09496 5.63804L5.79996 7.13804L8.51504 5.86196L7.81004 4.36196L5.09496 5.63804ZM4 6.5H6.4525V3.5H4V6.5ZM8.50751 18.5C8.50751 18.4982 8.50766 18.4979 8.50756 18.4984C8.50747 18.4988 8.50733 18.4992 8.50722 18.4995C8.50711 18.4998 8.50751 18.4988 8.50871 18.4976C8.50988 18.4964 8.50981 18.497 8.50723 18.4981C8.50584 18.4987 8.50412 18.4993 8.50229 18.4996C8.50037 18.5 8.49942 18.5 8.50001 18.5V15.5C6.83681 15.5 5.50751 16.8564 5.50751 18.5H8.50751ZM8.50001 18.5C8.49942 18.5 8.50037 18.5 8.50229 18.5004C8.50412 18.5007 8.50584 18.5013 8.50723 18.5019C8.50981 18.503 8.50988 18.5036 8.50871 18.5024C8.50751 18.5012 8.50711 18.5002 8.50722 18.5005C8.50733 18.5008 8.50747 18.5012 8.50756 18.5016C8.50766 18.5021 8.50751 18.5018 8.50751 18.5H5.50751C5.50751 20.1436 6.83681 21.5 8.50001 21.5V18.5ZM8.50001 18.5V21.5C10.1534 21.5 11.5 20.1534 11.5 18.5H8.50001ZM8.50001 18.5H11.5C11.5 16.8466 10.1534 15.5 8.50001 15.5V18.5ZM16 15.5C14.3368 15.5 13.0075 16.8564 13.0075 18.5H16.0075C16.0075 18.4982 16.0077 18.4979 16.0076 18.4984C16.0075 18.4988 16.0073 18.4992 16.0072 18.4995C16.0071 18.4998 16.0075 18.4988 16.0087 18.4976C16.0099 18.4964 16.0098 18.497 16.0072 18.4981C16.0058 18.4987 16.0041 18.4993 16.0023 18.4996C16.0004 18.5 15.9994 18.5 16 18.5V15.5ZM19 18.5C19 16.8466 17.6534 15.5 16 15.5V18.5H19ZM16 21.5C17.6534 21.5 19 20.1534 19 18.5H16V21.5ZM13.0075 18.5C13.0075 20.1436 14.3368 21.5 16 21.5V18.5C15.9994 18.5 16.0004 18.5 16.0023 18.5004C16.0041 18.5007 16.0058 18.5013 16.0072 18.5019C16.0098 18.503 16.0099 18.5036 16.0087 18.5024C16.0075 18.5012 16.0071 18.5002 16.0072 18.5005C16.0073 18.5008 16.0075 18.5012 16.0076 18.5016C16.0077 18.5021 16.0075 18.5018 16.0075 18.5H13.0075Z"
fill="#7F54B3"
mask="url(#path-1-inside-1_928_1005)"
/>
<circle cx="18" cy="7" r="3" fill="#7F54B3" />
</SVG>
);

export default miniCartAlt;

0 comments on commit e260fb4

Please sign in to comment.