From 99839030e9867246e32a30b3b1e30c0ce509d907 Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Wed, 27 Sep 2023 23:42:15 -0400 Subject: [PATCH] Update Edit props type for variation-options --- .../js/product-editor/src/blocks/variation-options/edit.tsx | 5 +++-- .../js/product-editor/src/blocks/variation-options/index.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/js/product-editor/src/blocks/variation-options/edit.tsx b/packages/js/product-editor/src/blocks/variation-options/edit.tsx index f6aa0586da6..49de0799c70 100644 --- a/packages/js/product-editor/src/blocks/variation-options/edit.tsx +++ b/packages/js/product-editor/src/blocks/variation-options/edit.tsx @@ -2,7 +2,7 @@ * External dependencies */ import { __ } from '@wordpress/i18n'; -import { BlockEditProps, BlockAttributes } from '@wordpress/blocks'; +import { BlockAttributes } from '@wordpress/blocks'; import { createElement, createInterpolateElement, @@ -26,10 +26,11 @@ import { useEntityProp, useEntityId } from '@wordpress/core-data'; import { useProductAttributes } from '../../hooks/use-product-attributes'; import { AttributeControl } from '../../components/attribute-control'; import { useProductVariationsHelper } from '../../hooks/use-product-variations-helper'; +import { ProductEditorBlockEditProps } from '../../types'; export function Edit( { attributes: blockAttributes, -}: BlockEditProps< BlockAttributes > ) { +}: ProductEditorBlockEditProps< BlockAttributes > ) { const blockProps = useWooBlockProps( blockAttributes ); const { generateProductVariations } = useProductVariationsHelper(); const { diff --git a/packages/js/product-editor/src/blocks/variation-options/index.ts b/packages/js/product-editor/src/blocks/variation-options/index.ts index cd9e326744d..7829fccedb9 100644 --- a/packages/js/product-editor/src/blocks/variation-options/index.ts +++ b/packages/js/product-editor/src/blocks/variation-options/index.ts @@ -22,6 +22,6 @@ export function init() { return registerWooBlockType( { name, metadata: metadata as never, - settings, + settings: settings as never, } ); }