Skip to content

Update Custom Components

SIRP uses custom React components to extend UI capabilities. Component code is located in agentic-soc-platform/Docker/SIRP/components/.

Component Types

TypeDescriptionProps
StorageCan store user input valuesvalue, onChange, env
ReferenceDisplay existing data only, cannot storeformData, env, currentControl

Available Components

Component FileDescriptionType
investigation_report_ai.jsxAI Investigation Report (Light)Reference
investigation_report_ai_dark.jsxAI Investigation Report (Dark)Reference
json.jsxJSON Viewer (Light)Reference
json_dark.jsxJSON Viewer (Dark)Reference

Dark mode components use _dark.jsx suffix for system dark theme.

Development Guidelines

Architecture

  • Single function component only, no import statements allowed
  • React built-ins (useState, useEffect, etc.) are globally available

Styling

  • Tailwind CSS only
  • Use <LucideIcon name="IconName" size="16" /> for icons (PascalCase)
  • Outer container must not include margins (p-*, m-*) or borders (border, shadow)

Error Handling

  • Throw new Error("...") on data parse failure, no error UI rendering
  • No console.log or comments in code

Update Process

img_2.pngimg_3.png

Select component to edit

img.png

Paste JSX code and save