diff --git a/packages/js/product-editor/src/blocks/description/edit.tsx b/packages/js/product-editor/src/blocks/description/edit.tsx index 769d713f9c7..aa748e09111 100644 --- a/packages/js/product-editor/src/blocks/description/edit.tsx +++ b/packages/js/product-editor/src/blocks/description/edit.tsx @@ -4,7 +4,6 @@ import { __ } from '@wordpress/i18n'; import { createElement, useState } from '@wordpress/element'; import { - BlockEditProps, BlockAttributes, BlockInstance, parse, @@ -20,6 +19,7 @@ import { useEntityProp } from '@wordpress/core-data'; */ import { ContentPreview } from '../../components/content-preview'; import { ModalEditor } from '../../components/modal-editor'; +import { ProductEditorBlockEditProps } from '../../types'; /** * Internal dependencies @@ -45,7 +45,9 @@ function clearDescriptionIfEmpty( blocks: BlockInstance[] ) { return blocks; } -export function Edit( { attributes }: BlockEditProps< BlockAttributes > ) { +export function Edit( { + attributes, +}: ProductEditorBlockEditProps< BlockAttributes > ) { const blockProps = useWooBlockProps( attributes ); const [ isModalOpen, setIsModalOpen ] = useState( false ); const [ description, setDescription ] = useEntityProp< string >( diff --git a/packages/js/product-editor/src/blocks/description/index.ts b/packages/js/product-editor/src/blocks/description/index.ts index 23131cd2074..d670004d84d 100644 --- a/packages/js/product-editor/src/blocks/description/index.ts +++ b/packages/js/product-editor/src/blocks/description/index.ts @@ -19,4 +19,8 @@ export const settings = { }; export const init = () => - registerWooBlockType( { name, metadata: metadata as never, settings } ); + registerWooBlockType( { + name, + metadata: metadata as never, + settings: settings as never, + } );