Rename block .editor files to .config
Also drop the color and leftSideBarVisible overrides from PageEditor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014xjLo7mFxZXfPDCHuKX4Dz
This commit is contained in:
co-authored by
Claude Opus 5
parent
3bc61066f0
commit
69ca137c7d
@@ -0,0 +1,39 @@
|
||||
import { ComponentConfig } from '@reacteditor/core';
|
||||
import type { ShopifyProduct } from '@reacteditor/plugin-shopify';
|
||||
import { Sparkles } from 'lucide-react';
|
||||
import ProductRecommendations from '@/components/shopify/product-recommendations';
|
||||
|
||||
export type ProductRecommendationsBlockProps = {
|
||||
title?: string;
|
||||
product?: ShopifyProduct | null;
|
||||
limit?: number;
|
||||
};
|
||||
|
||||
const productRecommendationsEditor: ComponentConfig<ProductRecommendationsBlockProps> =
|
||||
{
|
||||
label: 'Recommended products',
|
||||
icon: <Sparkles size={16} />,
|
||||
category: 'commerce',
|
||||
defaultProps: {
|
||||
title: 'You May Also Like',
|
||||
product: null,
|
||||
limit: 4,
|
||||
},
|
||||
fields: {
|
||||
title: { label: 'Title', type: 'text', contentEditable: true },
|
||||
product: {
|
||||
label: 'Seed product',
|
||||
type: 'shopifyProduct',
|
||||
} as any,
|
||||
limit: { label: 'Products shown', type: 'number', min: 2, max: 12 },
|
||||
},
|
||||
render: ({ title, product, limit }) => (
|
||||
<ProductRecommendations
|
||||
title={title}
|
||||
handle={product?.handle}
|
||||
limit={limit}
|
||||
/>
|
||||
),
|
||||
};
|
||||
|
||||
export default productRecommendationsEditor;
|
||||
Reference in New Issue
Block a user