Type@pillar-ai/react
CardComponentProps
Props passed to custom card components.
typescript
import type { CardComponentProps } from '@pillar-ai/react'
Definition
typescript
interface CardComponentProps<T = Record<string, unknown>> {/** Data extracted by the AI for this action */data: T;/** Called when user confirms the action */onConfirm: (modifiedData?: Record<string, unknown>) => void;/** Called when user cancels the action */onCancel: () => void;/** Called to report state changes (loading, success, error) */onStateChange?: (state: "loading" | "success" | "error",message?: string) => void;}
Properties
Properties
datarequiredT
Data extracted by the AI for this action
onConfirmrequired(modifiedData?: Record<string, unknown>) => void
Called when user confirms the action
onCancelrequired() => void
Called when user cancels the action
onStateChange(
state: "loading" | "success" | "error",
message?: string
) => void
Called to report state changes (loading, success, error)
Source:
packages/sdk-react/src/PillarProvider.tsx