import { Button, Group, PasswordInput, Text, Title } from "@mantine/core"; import { ModalsContextProps } from "@mantine/modals/lib/context"; import { useState } from "react"; const showEnterPasswordModal = ( modals: ModalsContextProps, submitCallback: any ) => { return modals.openModal({ closeOnClickOutside: false, withCloseButton: false, closeOnEscape: false, title: ( <> Password required This access this share please enter the password for the share. ), children: , }); }; const Body = ({ submitCallback }: { submitCallback: any }) => { const [password, setPassword] = useState(""); const [passwordWrong, setPasswordWrong] = useState(false); return ( <> setPasswordWrong(false)} onChange={(e) => setPassword(e.target.value)} value={password} /> ); }; export default showEnterPasswordModal;