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

Commit

Permalink
Replace IconButton component with Button (#3547)
Browse files Browse the repository at this point in the history
* Replace IconButton component with Button

* Fix All Products editor.scss file not included by Webpack
  • Loading branch information
Aljullu committed Dec 21, 2020
1 parent ca7ae3b commit a334951
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
3 changes: 1 addition & 2 deletions assets/js/blocks/featured-category/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import {
Button,
FocalPointPicker,
IconButton,
PanelBody,
Placeholder,
RangeControl,
Expand Down Expand Up @@ -105,7 +104,7 @@ const FeaturedCategory = ( {
allowedTypes={ [ 'image' ] }
value={ mediaId }
render={ ( { open } ) => (
<IconButton
<Button
className="components-toolbar__control"
label={ __( 'Edit media' ) }
icon="format-image"
Expand Down
3 changes: 1 addition & 2 deletions assets/js/blocks/featured-product/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { withSelect } from '@wordpress/data';
import {
Button,
FocalPointPicker,
IconButton,
PanelBody,
Placeholder,
RangeControl,
Expand Down Expand Up @@ -158,7 +157,7 @@ const FeaturedProduct = ( {
allowedTypes={ [ 'image' ] }
value={ mediaId }
render={ ( { open } ) => (
<IconButton
<Button
className="components-toolbar__control"
label={ __( 'Edit media' ) }
icon="format-image"
Expand Down
6 changes: 3 additions & 3 deletions assets/js/blocks/products/all-products/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
withSpokenMessages,
Placeholder,
Button,
IconButton,
Toolbar,
Disabled,
Tip,
Expand Down Expand Up @@ -46,6 +45,7 @@ import {
} from '../base-utils';
import { getSharedContentControls, getSharedListControls } from '../edit';
import Block from './block';
import './editor.scss';

/**
* Component to handle edit mode of "All Products".
Expand Down Expand Up @@ -235,7 +235,7 @@ class Editor extends Component {
>
{ __( 'Cancel', 'woo-gutenberg-products-block' ) }
</Button>
<IconButton
<Button
className="wc-block-all-products__reset-button"
icon={ <Icon srcElement={ grid } /> }
label={ __(
Expand All @@ -248,7 +248,7 @@ class Editor extends Component {
'Reset Layout',
'woo-gutenberg-products-block'
) }
</IconButton>
</Button>
</div>
</div>
</Placeholder>
Expand Down
5 changes: 0 additions & 5 deletions assets/js/blocks/products/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import { __ } from '@wordpress/i18n';
import { ToggleControl, SelectControl } from '@wordpress/components';

/**
* Internal dependencies
*/
import './editor.scss';

export const getSharedContentControls = ( attributes, setAttributes ) => {
const { contentVisibility } = attributes;
return (
Expand Down

0 comments on commit a334951

Please sign in to comment.