Fix empty cart inner blocks disabled (https://github.com/woocommerce/woocommerce-blocks/pull/1447)
This commit is contained in:
parent
57a8f0303d
commit
892a56364c
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { BlockControls } from '@wordpress/block-editor';
|
||||
import { Toolbar } from '@wordpress/components';
|
||||
import { Disabled, Toolbar } from '@wordpress/components';
|
||||
import { useState } from '@wordpress/element';
|
||||
import TextToolbarButton from '@woocommerce/block-components/text-toolbar-button';
|
||||
import PropTypes from 'prop-types';
|
||||
|
@ -49,7 +49,11 @@ const CartEditor = ( { className } ) => {
|
|||
return (
|
||||
<div className={ className }>
|
||||
{ getBlockControls() }
|
||||
{ isFullCartMode && <FullCart /> }
|
||||
{ isFullCartMode && (
|
||||
<Disabled>
|
||||
<FullCart />
|
||||
</Disabled>
|
||||
) }
|
||||
<EmptyCart hidden={ isFullCartMode } />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { InnerBlocks } from '@wordpress/block-editor';
|
||||
import { Disabled } from '@wordpress/components';
|
||||
import { registerBlockType } from '@wordpress/blocks';
|
||||
|
||||
/**
|
||||
|
@ -39,11 +38,7 @@ registerBlockType( 'woocommerce/cart', {
|
|||
* @param {Object} props Props to pass to block.
|
||||
*/
|
||||
edit( props ) {
|
||||
return (
|
||||
<Disabled>
|
||||
<Editor { ...props } />
|
||||
</Disabled>
|
||||
);
|
||||
return <Editor { ...props } />;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue