import React from 'react'; import { Button } from './button'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from './dialog'; import { Input } from './input'; type PasswordDialogProps = { open: boolean; onOpenChange: (_open: boolean) => void; setPassword: (_password: string) => void; onPasswordSubmit: () => void; isError?: boolean; }; export const PasswordDialog = ({ open, onOpenChange, onPasswordSubmit, isError, setPassword, }: PasswordDialogProps) => { return ( Password Required This document is password protected. Please enter the password to view the document. setPassword(e.target.value)} autoComplete="off" /> {isError && ( The password you entered is incorrect. Please try again. )} ); };