| 1 | import { ChatBubbleLeftIcon } from "@heroicons/react/24/outline"; |
| 2 | import { SlashCommandDescWithSource } from "core"; |
| 3 | |
| 4 | interface ConversationStarterCardProps { |
| 5 | command: SlashCommandDescWithSource; |
| 6 | onClick: (command: SlashCommandDescWithSource) => void; |
| 7 | } |
| 8 | |
| 9 | export function ConversationStarterCard({ |
| 10 | command, |
| 11 | onClick, |
| 12 | }: ConversationStarterCardProps) { |
| 13 | return ( |
| 14 | <div |
| 15 | className="bg-vsc-input-background mb-2 w-full rounded-md shadow-md hover:cursor-pointer hover:brightness-110" |
| 16 | onClick={() => onClick(command)} |
| 17 | > |
| 18 | <div className="flex px-3 py-1.5"> |
| 19 | <div className="mr-3 flex-shrink-0 self-start pt-0.5"> |
| 20 | <ChatBubbleLeftIcon className="text-lightgray h-5 w-5" /> |
| 21 | </div> |
| 22 | <div className="flex flex-1 flex-col justify-center"> |
| 23 | <div className="text-xs font-medium">{command.name}</div> |
| 24 | {command.description && ( |
| 25 | <div className="text-lightgray text-xs">{command.description}</div> |
| 26 | )} |
| 27 | </div> |
| 28 | </div> |
| 29 | </div> |
| 30 | ); |
| 31 | } |