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,44 @@
|
||||
import { ComponentConfig } from '@reacteditor/core';
|
||||
import { FileText } from 'lucide-react';
|
||||
import PolicyBody, {
|
||||
type PolicyBodyProps,
|
||||
} from '@/components/shopify/policy-body';
|
||||
import { POLICY_HANDLES } from '@/hooks/use-shopify-policies';
|
||||
|
||||
const policyBodyEditor: ComponentConfig<PolicyBodyProps> = {
|
||||
label: 'Policy',
|
||||
icon: <FileText size={16} />,
|
||||
category: 'content',
|
||||
defaultProps: {
|
||||
handle: '',
|
||||
title: '',
|
||||
notFoundMessage: 'This policy has not been published yet.',
|
||||
},
|
||||
fields: {
|
||||
handle: {
|
||||
label: 'Policy',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: 'Follow the page URL', value: '' },
|
||||
...POLICY_HANDLES.map((handle) => ({
|
||||
label: handle.replace(/-/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase()),
|
||||
value: handle,
|
||||
})),
|
||||
],
|
||||
},
|
||||
title: {
|
||||
label: 'Title override',
|
||||
type: 'text',
|
||||
placeholder: "Leave empty to use the policy's own title",
|
||||
contentEditable: true,
|
||||
},
|
||||
notFoundMessage: {
|
||||
label: 'Not-found message',
|
||||
type: 'text',
|
||||
contentEditable: true,
|
||||
},
|
||||
},
|
||||
render: (props) => <PolicyBody {...props} />,
|
||||
};
|
||||
|
||||
export default policyBodyEditor;
|
||||
Reference in New Issue
Block a user