UNPKG

@navinc/base-react-components

Version:
58 lines (57 loc) 1.75 kB
import type { FC } from 'react'; import React from 'react'; type PromptLibrarySectionProps = { /** * The text to display in the prompt library section */ title: string; /** * The prompts to display in the prompt library section */ prompts: string | string[]; /** * The function to call when a prompt is clicked */ onSelect: (promptText: string) => void; }; type NaviChatProps = { /** * The boolean value to show or hide the chat * @default false */ shouldShowChat: boolean; /** * This is a section that contains a title and a list of prompts. * @example * { * title: 'Title Here', * prompts: [ * 'What are the top actions I should take to improve my Experian business credit?', * 'How do I get my business credit scores to go up?', * 'Can you tell me more about tradelines? Do I have any?', * 'How does the credit builder card work?', * 'Why did my business credit score change?', * ], * } */ promptLibrary: Omit<PromptLibrarySectionProps, 'onSelect'> | Array<Omit<PromptLibrarySectionProps, 'onSelect'>>; /** * The text to display in the navi chat */ trigger?: React.ReactNode; /** * The function to call when a prompt card is clicked */ onPromptSelect?: (promptText: string) => void; /** * Callback fired when the prompt library drawer opens or closes * @param isOpen - boolean indicating if the drawer is open */ onPromptLibraryToggle?: (isOpen: boolean) => void; /** * Open the prompt library drawer */ isPromptLibraryOpen?: boolean; }; export declare const NaviChat: FC<NaviChatProps>; export {};