import * as React from 'react'; interface ModalProps { handleSubmit: () => void; isCancellable: boolean; handleCancel?: () => void; render: () => JSX.Element; modalState: string; isError: boolean; errorMessage?: string; } const Modal = (props: ModalProps) => { return (
{props.render()}
{props.isCancellable && ( )}
{props.isError && (

{props.errorMessage}

)}
); }; export default Modal;