This commit is contained in:
Albert Juhé Lluveras 2020-01-03 15:22:50 +01:00 committed by GitHub
parent 57a8f0303d
commit 892a56364c
2 changed files with 7 additions and 8 deletions

View File

@ -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>
);

View File

@ -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 } />;
},
/**