use default exports and not named exports

This commit is contained in:
Rami Bitar
2026-06-03 23:17:00 -04:00
parent a539753aa5
commit 7f86072636
21 changed files with 96 additions and 102 deletions

View File

@@ -2,10 +2,7 @@ import { ComponentConfig } from "@reacteditor/core";
import { Star } from "lucide-react";
import { FeaturedProductView, type FeaturedProductProps } from "@/components/commerce/featured-product";
export function createFeaturedProductEditor(opts: {
productField: any;
}): ComponentConfig<FeaturedProductProps> {
return {
const featuredProductEditor: ComponentConfig<FeaturedProductProps> = {
label: "Featured product",
icon: <Star size={16} />,
category: "commerce",
@@ -17,7 +14,7 @@ export function createFeaturedProductEditor(opts: {
tone: "default",
},
fields: {
product: { label: "Product", ...opts.productField },
product: { label: "Product", type: "shopifyProduct" } as any,
tagline: { label: "Tagline", type: "text", contentEditable: true },
ctaLabel: { label: "CTA label", type: "text", contentEditable: true },
align: {
@@ -38,5 +35,6 @@ export function createFeaturedProductEditor(opts: {
},
},
render: (props) => <FeaturedProductView {...props} />,
};
}
};
export default featuredProductEditor;