import React, { FC, ReactElement } from 'react'; import { Button, Dialog, DialogActions, DialogBody, DialogContent, DialogSurface, DialogTitle, DialogTrigger } from '@fluentui/react-components'; import { ToolTipButton } from './ToolTipButton'; import { useTranslation } from 'react-i18next'; import { LazyImportComponent } from './LazyImportComponent'; const MarkdownRender = React.lazy(() => import('./MarkdownRender')); export const DialogButton: FC<{ text?: string | null icon?: ReactElement, tooltip?: string | null, className?: string, title: string, contentText: string, markdown?: boolean, onConfirm?: () => void, size?: 'small' | 'medium' | 'large', shape?: 'rounded' | 'circular' | 'square', appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent', }> = ({ text, icon, tooltip, className, title, contentText, markdown, onConfirm, size, shape, appearance }) => { const { t } = useTranslation(); return {tooltip ? : } {title} { markdown ? {contentText} : contentText } ; };