Package: @lilith/ui-dev-content Split from: lilith/ui.git or lilith/build.git Publish workflow: calls lilith/workflows/.forgejo/workflows/publish-npm.yml@main
36 lines
No EOL
1.2 KiB
TypeScript
36 lines
No EOL
1.2 KiB
TypeScript
/**
|
|
* EditableContent - Wrapper component for marking content as editable
|
|
*
|
|
* This is the primary API for feature developers to mark content as editable.
|
|
* It automatically registers with the overlay in dev mode.
|
|
*/
|
|
import { type ReactNode, type ElementType } from 'react';
|
|
import type { ContentType } from '../core/interfaces';
|
|
export interface EditableContentProps {
|
|
/** Content source plugin ID */
|
|
source: string;
|
|
/** Unique identifier for this content */
|
|
identifier: string;
|
|
/** Type of content */
|
|
type?: ContentType;
|
|
/** Restrict which transformers can be used */
|
|
transformers?: string[];
|
|
/** Child content to render */
|
|
children: ReactNode;
|
|
/** Optional className for styling */
|
|
className?: string;
|
|
/** Optional custom tag (defaults to div) */
|
|
as?: ElementType;
|
|
}
|
|
/**
|
|
* Wrapper component that marks content as editable
|
|
*
|
|
* @example
|
|
* ```tsx
|
|
* <EditableContent source="locale" identifier="home.hero.title">
|
|
* {t('hero.title')}
|
|
* </EditableContent>
|
|
* ```
|
|
*/
|
|
export declare function EditableContent({ source, identifier, type, transformers, children, className, as: Component, }: EditableContentProps): import("react/jsx-runtime").JSX.Element;
|
|
//# sourceMappingURL=EditableContent.d.ts.map
|