From a30fd6d6c0b5154fd967e85a68ade3f6ca20a64e Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 30 Apr 2025 23:05:02 +0200 Subject: [PATCH] courrier preview --- components/email/ComposeEmail.tsx | 174 ++++++++++++++++++------------ 1 file changed, 108 insertions(+), 66 deletions(-) diff --git a/components/email/ComposeEmail.tsx b/components/email/ComposeEmail.tsx index eb0d7f8d..5e5e31ac 100644 --- a/components/email/ComposeEmail.tsx +++ b/components/email/ComposeEmail.tsx @@ -209,82 +209,86 @@ export default function ComposeEmail(props: ComposeEmailProps) { type={type} onClose={onClose} /> -
-
- {/* To Field */} -
- - setTo(e.target.value)} - placeholder="recipient@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- - {/* CC/BCC Toggle Buttons */} -
- - -
- - {/* CC Field */} - {showCc && ( -
- + {/* Improve scrolling by wrapping form in a ScrollArea */} +
+
+ {/* Email fields section - fixed size */} +
+ {/* To Field */} +
+ setCc(e.target.value)} - placeholder="cc@example.com" + id="to" + value={to} + onChange={(e) => setTo(e.target.value)} + placeholder="recipient@example.com" className="w-full mt-1 bg-white border-gray-300 text-gray-900" />
- )} - {/* BCC Field */} - {showBcc && ( -
- + {/* CC/BCC Toggle Buttons */} +
+ + +
+ + {/* CC Field */} + {showCc && ( +
+ + setCc(e.target.value)} + placeholder="cc@example.com" + className="w-full mt-1 bg-white border-gray-300 text-gray-900" + /> +
+ )} + + {/* BCC Field */} + {showBcc && ( +
+ + setBcc(e.target.value)} + placeholder="bcc@example.com" + className="w-full mt-1 bg-white border-gray-300 text-gray-900" + /> +
+ )} + + {/* Subject Field */} +
+ setBcc(e.target.value)} - placeholder="bcc@example.com" + id="subject" + value={subject} + onChange={(e) => setSubject(e.target.value)} + placeholder="Enter subject" className="w-full mt-1 bg-white border-gray-300 text-gray-900" />
- )} - - {/* Subject Field */} -
- - setSubject(e.target.value)} - placeholder="Enter subject" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - />
- {/* Message Body */} -
+ {/* Message Body - with improved overflow handling */} +
-
+
0 && ( -
+

Attachments

-
+
{attachments.map((file, index) => (
{file.name} @@ -318,6 +322,7 @@ export default function ComposeEmail(props: ComposeEmailProps) { )}
+ {/* Modal Footer - now inside the main modal container and visually attached */}
@@ -376,6 +381,43 @@ export default function ComposeEmail(props: ComposeEmailProps) {
+ + {/* Add styles for better formatting */} +
); } \ No newline at end of file