import React, { FC } from 'react'; import { Dialog, Transition } from '@headlessui/react'; import Spin from './Spin'; import Button from './Button'; import Close from '../icons/Close'; import { useTranslation } from 'react-i18next'; import cx from 'classnames'; export interface Props { open?: boolean; onClose: (value: boolean) => void; className?: string; title?: string | JSX.Element | React.ReactNode; description?: string | JSX.Element | React.ReactNode; children?: JSX.Element | React.ReactNode; footer?: JSX.Element | React.ReactNode; loading?: boolean; closable?: boolean; width?: string; widthMd?: string; } const Modal: FC = ({ open = false, onClose, className, title, description, children, footer, loading = false, closable = true, width = '100%', widthMd = '100%', }: Props) => { const { t } = useTranslation(); return (