@erdoai/ui 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -318,6 +318,34 @@ const customFetcher = {
318
318
  >
319
319
  ```
320
320
 
321
+ ### Custom Content Component
322
+
323
+ For rendering nested content in invocation components (like `InvocationEvents`, `Output`, `StepInvocation`), you can provide a `ContentComponent` at the provider level:
324
+
325
+ ```tsx
326
+ import { ErdoProvider, Content } from '@erdoai/ui';
327
+
328
+ // Use SDK's default Content component
329
+ <ErdoProvider
330
+ config={{
331
+ baseUrl: 'https://api.erdo.ai',
332
+ ContentComponent: Content,
333
+ }}
334
+ >
335
+
336
+ // Or use your own custom Content component
337
+ import { MyCustomContent } from './my-content';
338
+
339
+ <ErdoProvider
340
+ config={{
341
+ baseUrl: 'https://api.erdo.ai',
342
+ ContentComponent: MyCustomContent,
343
+ }}
344
+ >
345
+ ```
346
+
347
+ This allows invocation components to render nested content without requiring you to pass `ContentComponent` as a prop to every component. Components will automatically use the provider's `ContentComponent` as a default, but you can still override it via props if needed.
348
+
321
349
  ## Styling
322
350
 
323
351
  Components use Tailwind CSS classes. Make sure Tailwind is configured in your project and includes the @erdoai/ui package in your content paths: