ApprovalCardProps
Borrowed decision presentation; matching, commands and pending state belong to the app.
import type { ApprovalCardProps } from '@threadplane/react/chat';Declaration
export interface ApprovalCardProps {
readonly actions: readonly ApprovalCardAction[];
readonly autoFocus?: boolean;
readonly children: ReactNode;
readonly className?: string;
readonly destructive?: boolean;
readonly disabled?: boolean;
readonly onDismiss?: () => void;
readonly presentation?: 'inline' | 'dialog';
readonly title?: string;
}Members
actions
readonly actions: readonly ApprovalCardAction[];autoFocus
Moves focus to the first action when the card appears. Defaults to true.
readonly autoFocus?: boolean;children
readonly children: ReactNode;className
readonly className?: string;destructive
Marks an action that cannot be undone: danger tint, the lead "This can't be undone." and a danger primary button. Name the exact effect in the first action, such as "Delete 12 drafts".
readonly destructive?: boolean;disabled
readonly disabled?: boolean;onDismiss
Dialog only: called when the user presses Escape. The dialog stays open until you unmount the card, so answer the request here, usually the same way as your declining action. Without it, Escape does nothing.
readonly onDismiss?: () => void;presentation
inline (default) renders the panel where the card is placed. dialog shows the same content
in a modal over the page for as long as the card is mounted: the rest of the page is inert,
and focus returns to where it was when the card unmounts.
readonly presentation?: 'inline' | 'dialog';title
The request in plain words, such as "Save the comparison note to your workspace?"
readonly title?: string;