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

add new icons and remove old ones #1644

Merged
merged 11 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const blockConfig = {
'woo-gutenberg-products-block'
),
icon: {
src: <Icon icon={ cart } />,
src: <Icon srcElement={ cart } />,
foreground: '#96588a',
},
edit( props ) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const blockConfig = {
'woo-gutenberg-products-block'
),
icon: {
src: <Icon icon={ image } />,
src: <Icon srcElement={ image } />,
foreground: '#96588a',
},
attributes: {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/price/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const blockConfig = {
'woo-gutenberg-products-block'
),
icon: {
src: <Icon icon={ bill } />,
src: <Icon srcElement={ bill } />,
foreground: '#96588a',
},

Expand Down
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/rating/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const blockConfig = {
'woo-gutenberg-products-block'
),
icon: {
src: <Icon icon={ star } />,
src: <Icon srcElement={ star } />,
foreground: '#96588a',
},

Expand Down
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/sale-badge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const blockConfig = {
'woo-gutenberg-products-block'
),
icon: {
src: <Icon icon={ tag } />,
src: <Icon srcElement={ tag } />,
foreground: '#96588a',
},
supports: {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/shared-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
category: 'woocommerce',
keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
icon: {
src: <Icon icon={ grid } />,
src: <Icon srcElement={ grid } />,
foreground: '#96588a',
},
supports: {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/atomic/blocks/product/summary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const blockConfig = {
'woo-gutenberg-products-block'
),
icon: {
src: <Icon icon={ notes } />,
src: <Icon srcElement={ notes } />,
foreground: '#96588a',
},

Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/checkout/no-shipping/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import './style.scss';
const NoShipping = () => {
return (
<Placeholder
icon={ <Icon icon={ truck } /> }
icon={ <Icon srcElement={ truck } /> }
label={ __( 'Shipping options', 'woo-gutenberg-products-block' ) }
className="wc-block-checkout__no-shipping"
>
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/active-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import edit from './edit.js';
registerBlockType( 'woocommerce/active-filters', {
title: __( 'Active Product Filters', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ toggle } />,
src: <Icon srcElement={ toggle } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
6 changes: 3 additions & 3 deletions assets/js/blocks/attribute-filter/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => {
const noAttributesPlaceholder = () => (
<Placeholder
className="wc-block-attribute-filter"
icon={ <Icon icon={ server } /> }
icon={ <Icon srcElement={ server } /> }
label={ __(
'Filter Products by Attribute',
'woo-gutenberg-products-block'
Expand All @@ -246,7 +246,7 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => {
>
{ __( 'Add new attribute', 'woo-gutenberg-products-block' ) +
' ' }
<Icon icon={ external } />
<Icon srcElement={ external } />
</Button>
<Button
className="wc-block-attribute-filter__read_more_button"
Expand Down Expand Up @@ -357,7 +357,7 @@ const Edit = ( { attributes, setAttributes, debouncedSpeak } ) => {
return (
<Placeholder
className="wc-block-attribute-filter"
icon={ <Icon icon={ server } /> }
icon={ <Icon srcElement={ server } /> }
label={ __(
'Filter Products by Attribute',
'woo-gutenberg-products-block'
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/attribute-filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import edit from './edit.js';
registerBlockType( 'woocommerce/attribute-filter', {
title: __( 'Filter Products by Attribute', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ server } />,
src: <Icon srcElement={ server } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const CartLineItemRow = ( { lineItem } ) => {
{ __( 'Remove item', 'woo-gutenberg-products-block' ) }
</button>
<button className="wc-block-cart-item__remove-icon">
<Icon icon={ trash } />
<Icon srcElement={ trash } />
</button>
</td>
<td className="wc-block-cart-item__total">
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/cart-checkout/cart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import './style.scss';
registerBlockType( 'woocommerce/cart', {
title: __( 'Cart', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ cart } />,
src: <Icon srcElement={ cart } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/cart-checkout/checkout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import './editor.scss';
registerBlockType( 'woocommerce/checkout', {
title: __( 'Checkout', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ card } />,
src: <Icon srcElement={ card } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
4 changes: 2 additions & 2 deletions assets/js/blocks/featured-category/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const FeaturedCategory = ( {

return (
<Placeholder
icon={ <Icon icon={ FolderStarred } /> }
icon={ <Icon srcElement={ FolderStarred } /> }
senadir marked this conversation as resolved.
Show resolved Hide resolved
label={ __(
'Featured Category',
'woo-gutenberg-products-block'
Expand Down Expand Up @@ -337,7 +337,7 @@ const FeaturedCategory = ( {
const renderNoCategory = () => (
<Placeholder
className="wc-block-featured-category"
icon={ <Icon icon={ FolderStarred } /> }
icon={ <Icon srcElement={ FolderStarred } /> }
label={ __( 'Featured Category', 'woo-gutenberg-products-block' ) }
>
{ isLoading ? (
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/featured-category/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { example } from './example';
registerBlockType( 'woocommerce/featured-category', {
title: __( 'Featured Category', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ FolderStarred } />,
src: <Icon srcElement={ FolderStarred } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
4 changes: 2 additions & 2 deletions assets/js/blocks/featured-product/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const FeaturedProduct = ( {
<Fragment>
{ getBlockControls() }
<Placeholder
icon={ <Icon icon={ star } /> }
icon={ <Icon srcElement={ star } /> }
label={ __(
'Featured Product',
'woo-gutenberg-products-block'
Expand Down Expand Up @@ -383,7 +383,7 @@ const FeaturedProduct = ( {
const renderNoProduct = () => (
<Placeholder
className="wc-block-featured-product"
icon={ <Icon icon={ star } /> }
icon={ <Icon srcElement={ star } /> }
label={ __( 'Featured Product', 'woo-gutenberg-products-block' ) }
>
{ isLoading ? (
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/featured-product/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Block from './block';
registerBlockType( 'woocommerce/featured-product', {
title: __( 'Featured Product', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ star } />,
src: <Icon srcElement={ star } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/handpicked-products/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ProductsBlock extends Component {

return (
<Placeholder
icon={ <Icon icon={ widgets } /> }
icon={ <Icon srcElement={ widgets } /> }
label={ __(
'Hand-picked Products',
'woo-gutenberg-products-block'
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/handpicked-products/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { deprecatedConvertToShortcode } from '../../utils/deprecations';
registerBlockType( 'woocommerce/handpicked-products', {
title: __( 'Hand-picked Products', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ widgets } />,
src: <Icon srcElement={ widgets } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
4 changes: 2 additions & 2 deletions assets/js/blocks/price-filter/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function( { attributes, setAttributes } ) {
const noProductsPlaceholder = () => (
<Placeholder
className="wc-block-price-slider"
icon={ <Icon icon={ bill } /> }
icon={ <Icon srcElement={ bill } /> }
label={ __(
'Filter Products by Price',
'woo-gutenberg-products-block'
Expand All @@ -140,7 +140,7 @@ export default function( { attributes, setAttributes } ) {
>
{ __( 'Add new product', 'woo-gutenberg-products-block' ) +
' ' }
<Icon icon={ external } />
<Icon srcElement={ external } />
</Button>
<Button
className="wc-block-price-slider__read_more_button"
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/price-filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import edit from './edit.js';
registerBlockType( 'woocommerce/price-filter', {
title: __( 'Filter Products by Price', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ bill } />,
src: <Icon srcElement={ bill } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-best-sellers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import sharedAttributes, {
registerBlockType( 'woocommerce/product-best-sellers', {
title: __( 'Best Selling Products', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ stonks } />,
src: <Icon srcElement={ stonks } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-categories/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ToggleButtonControl from '@woocommerce/block-components/toggle-button-con

const EmptyPlaceholder = () => (
<Placeholder
icon={ <Icon icon={ list } /> }
icon={ <Icon srcElement={ list } /> }
label={ __(
'Product Categories List',
'woo-gutenberg-products-block'
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Block from './block.js';
registerBlockType( 'woocommerce/product-categories', {
title: __( 'Product Categories List', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ list } />,
src: <Icon srcElement={ list } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
4 changes: 2 additions & 2 deletions assets/js/blocks/product-category/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class ProductByCategoryBlock extends Component {

return (
<Placeholder
icon={ <Icon icon={ folder } /> }
icon={ <Icon srcElement={ folder } /> }
label={ __(
'Products by Category',
'woo-gutenberg-products-block'
Expand Down Expand Up @@ -249,7 +249,7 @@ class ProductByCategoryBlock extends Component {
attributes={ attributes }
EmptyResponsePlaceholder={ () => (
<Placeholder
icon={ <Icon icon={ folder } /> }
icon={ <Icon srcElement={ folder } /> }
label={ __(
'Products by Category',
'woo-gutenberg-products-block'
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-category/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import sharedAttributes, {
registerBlockType( 'woocommerce/product-category', {
title: __( 'Products by Category', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ folder } />,
src: <Icon srcElement={ folder } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-new/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import sharedAttributes, {
registerBlockType( 'woocommerce/product-new', {
title: __( 'Newest Products', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ exclamation } />,
src: <Icon srcElement={ exclamation } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-on-sale/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Icon, tag } from '@woocommerce/icons';

const EmptyPlaceholder = () => (
<Placeholder
icon={ <Icon icon={ tag } /> }
icon={ <Icon srcElement={ tag } /> }
label={ __( 'On Sale Products', 'woo-gutenberg-products-block' ) }
className="wc-block-product-on-sale"
>
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-on-sale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import sharedAttributes, {
registerBlockType( 'woocommerce/product-on-sale', {
title: __( 'On Sale Products', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ tag } />,
src: <Icon srcElement={ tag } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Block from './block.js';
registerBlockType( 'woocommerce/product-search', {
title: __( 'Product Search', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ search } />,
src: <Icon srcElement={ search } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
5 changes: 4 additions & 1 deletion assets/js/blocks/product-tag/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ class ProductsByTagBlock extends Component {
return (
<Placeholder
icon={
<Icon icon={ more } className="block-editor-block-icon" />
<Icon
srcElement={ more }
className="block-editor-block-icon"
/>
}
label={ __(
'Products by Tag',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-tag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Block from './block';
registerBlockType( 'woocommerce/product-tag', {
title: __( 'Products by Tag', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ more } />,
src: <Icon srcElement={ more } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/product-top-rated/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const blockTypeName = 'woocommerce/product-top-rated';
registerBlockType( blockTypeName, {
title: __( 'Top Rated Products', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ thumbUp } />,
src: <Icon srcElement={ thumbUp } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/products-by-attribute/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ProductsByAttributeBlock extends Component {

return (
<Placeholder
icon={ <Icon icon={ tags } /> }
icon={ <Icon srcElement={ tags } /> }
label={ __(
'Products by Attribute',
'woo-gutenberg-products-block'
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/products-by-attribute/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const blockTypeName = 'woocommerce/products-by-attribute';
registerBlockType( blockTypeName, {
title: __( 'Products by Attribute', 'woo-gutenberg-products-block' ),
icon: {
src: <Icon icon={ tags } />,
src: <Icon srcElement={ tags } />,
foreground: '#96588a',
},
category: 'woocommerce',
Expand Down
4 changes: 2 additions & 2 deletions assets/js/blocks/products/all-products/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Editor extends Component {
};

getIcon = () => {
return <Icon icon={ grid } />;
return <Icon srcElement={ grid } />;
};

togglePreview = () => {
Expand Down Expand Up @@ -232,7 +232,7 @@ class Editor extends Component {
</Button>
<IconButton
className="wc-block-all-products__reset-button"
icon={ <Icon icon={ grid } /> }
icon={ <Icon srcElement={ grid } /> }
label={ __(
'Reset layout to default',
'woo-gutenberg-products-block'
Expand Down
Loading