feat: pass ErrorMessage as a prop to Modal

This commit is contained in:
Sukhman S
2023-07-02 10:34:43 +05:30
parent d998815847
commit bf78bdd6d4

View File

@@ -7,6 +7,7 @@ interface ModalProps {
render: () => JSX.Element;
modalState: string;
isError: boolean;
errorMessage?: string;
}
const Modal = (props: ModalProps) => {
return (
@@ -35,7 +36,7 @@ const Modal = (props: ModalProps) => {
</div>
{props.isError && (
<p className="mx-auto mt-2 mr-auto text-sm text-red-500">
Please enter a valid API key
{props.errorMessage}
</p>
)}
</div>