AsterUIDocsv1.0.2

Docs / Component reference

ApprovalCard & yield* requestApproval()

Show the proposed change and the person responsible for reviewing it. The application receives the decision and handles what happens next.

Approval card example

Install

sh
npx @fierst/ui@1.0.2 add approval-card

Registry dependencies: theme, icon, badge, button. Package dependencies: @lucide/icons.

Exports from ./ui/approval-card: ApprovalCard, requestApproval.

Download the registry source for approval-card 1.0.2.

API contracts

ts
export function ApprovalCard({
  title,
  description,
  assigneeRole,
  artifactHash,
  codePreview,
  danger = false,
  approveLabel = 'Approve & Resume',
  rejectLabel = 'Reject',
  onApprove,
  onReject,
  class: extraClass,
}: {
  title: string;
  description?: string;
  assigneeRole?: string;
  artifactHash?: string;
  codePreview?: string;
  danger?: boolean;
  approveLabel?: string;
  rejectLabel?: string;
  onApprove: () => void;
  onReject: () => void;
  class?: string;
})

export function* requestApproval(opts: {
  title: string;
  description?: string;
  assigneeRole?: string;
  artifactHash?: string;
  codePreview?: string;
  danger?: boolean;
}): Generator<View, boolean, any>