@payfit/unity-components
Version:
31 lines (30 loc) • 1.37 kB
TypeScript
import { CardProps } from '../../../../core/components/card/Card.js';
import { ReactNode } from 'react';
import { AIProposalCardState } from './ProposalCard.context.js';
export interface AIProposalCardProps extends Omit<CardProps, 'children' | 'density'> {
/** Compound AIProposalCard parts that describe the proposed operation. */
children: ReactNode;
/**
* Identifies whether the proposal awaits a decision or is retained history.
*/
state: AIProposalCardState;
/** Controls historical-proposal disclosure. Ignored while pending. */
isExpanded?: boolean;
/**
* The initial disclosure state for a confirmed or dismissed proposal.
* @default false
*/
defaultExpanded?: boolean;
/** Receives a requested disclosure change for a historical proposal. */
onExpandedChange?: (isExpanded: boolean) => void;
}
/**
* Presents an AI-proposed operation, its supporting details, and the actions
* needed to decide it.
*
* Pending proposals show their content and consumer-provided actions. Confirmed
* and dismissed proposals retain the same details behind an accessible,
* controlled or uncontrolled disclosure.
*/
export declare const AIProposalCard: import('react').ForwardRefExoticComponent<Omit<AIProposalCardProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
export type { AIProposalCardState };