Update Edit props type for variation-options

This commit is contained in:
Matt Sherman 2023-09-27 23:42:15 -04:00
parent 1d21956def
commit 99839030e9
2 changed files with 4 additions and 3 deletions

View File

@ -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 {

View File

@ -22,6 +22,6 @@ export function init() {
return registerWooBlockType( {
name,
metadata: metadata as never,
settings,
settings: settings as never,
} );
}