import { ModalBody, ModalBodyProps, ModalHeader, ModalHeaderProps } from '@patternfly/react-core'; import type { FunctionComponent } from 'react'; import { ChatbotDisplayMode } from '../Chatbot'; import ChatbotModal, { ChatbotModalProps } from '../ChatbotModal'; import { FileIcon } from '@patternfly/react-icons'; export interface FilePreviewProps extends ChatbotModalProps { /** Class applied to modal */ className?: string; /** Function that handles modal toggle */ handleModalToggle: (event: React.MouseEvent | MouseEvent | KeyboardEvent) => void; /** Whether modal is open */ isModalOpen: boolean; /** Title of modal */ title?: string; /** Display mode for the Chatbot parent; this influences the styles applied */ displayMode?: ChatbotDisplayMode; /** File name */ fileName: string; /** Sets modal to compact styling. */ isCompact?: boolean; /** Additional props passed to modal header */ modalHeaderProps?: ModalHeaderProps; /** Additional props passed to modal body */ modalBodyProps?: ModalBodyProps; } const FilePreview: FunctionComponent = ({ isModalOpen, displayMode = ChatbotDisplayMode.default, children, fileName, isCompact, className, handleModalToggle, title = 'File preview', modalHeaderProps, modalBodyProps, ...props }: FilePreviewProps) => (

{fileName}

{children &&
{children}
}
); export default FilePreview;