tahamajs/IE / Projects /front /src /components /genui /ComponentRenderer.tsx
tahamajs's picture
download
raw
635 Bytes
import { getComponent } from "@/lib/genui-registry";
import type { GenUIComponentInstance } from "@/types/genui";
interface ComponentRendererProps {
instance: GenUIComponentInstance;
onAction?: (componentId: string, action: string, data: any) => void;
}
export function ComponentRenderer({ instance, onAction }: ComponentRendererProps) {
const Component = getComponent(instance.componentName);
return (
<div className="my-2">
<Component
{...instance.props}
onAction={(action: string, data: any) => onAction?.(instance.id, action, data)}
componentId={instance.id}
/>
</div>
);
}

Xet Storage Details

Size:
635 Bytes
·
Xet hash:
55dd34b328e0e44e278d5bb496da3f31c38bee22405a1816a58e58d5088ed4dd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.