Approval CardApproval Card
봇이 실행 전에 승인을 받는 카드입니다.A card the bot uses to get approval before it runs something.
대화Conversation
Solid
Needs your yes
Send the Q3 board deck to the team?
Needs your yes
Send the Q3 board deck to the team?
Approved · sent 8:14 AM
Send the Q3 board deck to the team?
Declined · yesterday
Send the Q3 board deck to the team?
Glass
Needs your yes
Send the Q3 board deck to the team?
Approved · sent 8:14 AM
Send the Q3 board deck to the team?
Declined · yesterday
Send the Q3 board deck to the team?
import { ApprovalCard, type ApprovalState } from "@horon-ai/react"; import { useState } from "react"; function InteractiveApproval() { const [state, setState] = useState<ApprovalState>("pending"); return ( <ApprovalCard state={state} title="Send the Q3 board deck to the team?" attachment="Q3 board deck v5" onApprove={() => setState("approved")} onLater={() => setState("declined")} /> ); } function Examples({ surface }: { surface: "solid" | "glass" }) { return ( <div className="flex flex-wrap items-start justify-center gap-4"> <ApprovalCard surface={surface} title="Send the Q3 board deck to the team?" attachment="Q3 board deck v5" /> <ApprovalCard surface={surface} state="approved" status="Approved · sent 8:14 AM" title="Send the Q3 board deck to the team?" attachment="Q3 board deck v5" /> <ApprovalCard surface={surface} state="declined" status="Declined · yesterday" title="Send the Q3 board deck to the team?" attachment="Q3 board deck v5" /> </div> ); } export default function ApprovalCardDemo() { return ( <div className="flex w-full flex-col gap-6"> <div className="flex flex-col gap-4"> <p className="text-caption text-text-secondary">Solid</p> <div className="flex flex-wrap items-start justify-center gap-4"> <InteractiveApproval /> </div> <Examples surface="solid" /> </div> <> <p className="text-caption text-text-secondary">Glass</p> <Examples surface="glass" /> </> </div> ); }