use default exports and not named exports
This commit is contained in:
@@ -2,15 +2,13 @@ import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Package } from "lucide-react";
|
||||
import { ProductDetailsView, type ProductDetailsProps } from "@/components/commerce/product-details";
|
||||
|
||||
export function createProductDetailsEditor(opts: {
|
||||
productField: any;
|
||||
}): ComponentConfig<ProductDetailsProps> {
|
||||
return {
|
||||
const productDetailsEditor: ComponentConfig<ProductDetailsProps> = {
|
||||
label: "Product details",
|
||||
icon: <Package size={16} />,
|
||||
category: "commerce",
|
||||
defaultProps: { product: null },
|
||||
fields: { product: { label: "Product", ...opts.productField } },
|
||||
fields: { product: { label: "Product", type: "shopifyProduct" } as any },
|
||||
render: (props) => <ProductDetailsView {...props} />,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export default productDetailsEditor;
|
||||
|
||||
Reference in New Issue
Block a user