import { forwardRef } from 'react'; // Styled import { StyledBody, StyledDialog, StyledTitle } from './styled'; export interface IDialogProps { title?: string; children?: JSX.Element[] | JSX.Element; onClose?: () => void; reload?: boolean; setReload?: React.Dispatch>; ref?: React.MutableRefObject; data?: T | null; isAdd?: boolean; } const Dialog = forwardRef((props, ref) => { const { title, children, onClose } = props as IDialogProps; return ( | undefined} onClose={onClose} > {title} {children} ); }) as React.FC>; export default Dialog;