// ============================================================================ // Chatbot Layout - Chat - Welcome // ============================================================================ import type { FunctionComponent } from 'react'; import { Content, ContentVariants, Card, CardHeader, CardTitle, CardBody } from '@patternfly/react-core'; export interface ChatbotWelcomePromptProps extends React.HTMLProps { /** Title for the welcome message*/ title: string; /** Welcome message */ description: string; /** Custom basic prompts to help users coming for the first time to chatbot */ prompts?: WelcomePrompt[]; /** Custom classname for the WelcomePrompt component */ className?: string; /** Custom test id for the WelcomePrompt component */ testId?: string; isCompact?: boolean; } export interface WelcomePrompt { /** Message for the welcome prompt */ message?: string; /** Title for the welcome prompt */ title: string; /** Callback handler for the onClick event for welcome prompt */ onClick?: () => void; } export const ChatbotWelcomePrompt: FunctionComponent = ({ title, description, prompts, className, testId, isCompact = false, ...props }: ChatbotWelcomePromptProps) => (
{title}
{description}
{prompts && (
{prompts?.map((prompt, index) => ( {prompt.title} {prompt.message && {prompt.message}} ))}
)}
); export default ChatbotWelcomePrompt;