Featured Product: Remove ability to change source product (https://github.com/woocommerce/woocommerce-blocks/pull/415)
This commit is contained in:
parent
299412bb0f
commit
ee8e185e4d
|
@ -126,18 +126,6 @@ class FeaturedProduct extends Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InspectorControls key="inspector">
|
<InspectorControls key="inspector">
|
||||||
<PanelBody
|
|
||||||
title={ __( 'Product', 'woo-gutenberg-products-block' ) }
|
|
||||||
initialOpen={ false }
|
|
||||||
>
|
|
||||||
<ProductControl
|
|
||||||
selected={ attributes.productId || 0 }
|
|
||||||
onChange={ ( value = [] ) => {
|
|
||||||
const id = value[ 0 ] ? value[ 0 ].id : 0;
|
|
||||||
setAttributes( { productId: id, mediaId: 0, mediaSrc: '' } );
|
|
||||||
} }
|
|
||||||
/>
|
|
||||||
</PanelBody>
|
|
||||||
<PanelBody title={ __( 'Content', 'woo-gutenberg-products-block' ) }>
|
<PanelBody title={ __( 'Content', 'woo-gutenberg-products-block' ) }>
|
||||||
<ToggleControl
|
<ToggleControl
|
||||||
label={ __( 'Show description', 'woo-gutenberg-products-block' ) }
|
label={ __( 'Show description', 'woo-gutenberg-products-block' ) }
|
||||||
|
@ -255,16 +243,6 @@ class FeaturedProduct extends Component {
|
||||||
setAttributes( { contentAlign: nextAlign } );
|
setAttributes( { contentAlign: nextAlign } );
|
||||||
} }
|
} }
|
||||||
/>
|
/>
|
||||||
<Toolbar
|
|
||||||
controls={ [
|
|
||||||
{
|
|
||||||
icon: 'edit',
|
|
||||||
title: __( 'Edit' ),
|
|
||||||
onClick: () => setAttributes( { editMode: ! editMode } ),
|
|
||||||
isActive: editMode,
|
|
||||||
},
|
|
||||||
] }
|
|
||||||
/>
|
|
||||||
<MediaUploadCheck>
|
<MediaUploadCheck>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<MediaUpload
|
<MediaUpload
|
||||||
|
|
Loading…
Reference in New Issue