fix: adjust class names in Form components for improved layout handling

This commit is contained in:
faisolavolut 2025-02-26 15:42:22 +07:00
parent 2746ea873b
commit a2a3c777ac
2 changed files with 6 additions and 3 deletions

View File

@ -343,7 +343,10 @@ export const Form: React.FC<any> = ({
) : ( ) : (
<> <>
<form <form
className="flex flex-col " className={cx(
"flex flex-col ",
typeof onFooter === "function" ? "" : "flex-grow"
)}
onSubmit={(e) => { onSubmit={(e) => {
e.preventDefault(); e.preventDefault();
local.submit(); local.submit();
@ -374,7 +377,7 @@ export const Form: React.FC<any> = ({
{onFooter(local)} {onFooter(local)}
</div> </div>
) : ( ) : (
<div className="flex flex-grow flex-col"></div> <></>
)} )}
</> </>
)} )}

View File

@ -30,7 +30,7 @@ export const FormBetter: React.FC<any> = ({
<></> <></>
)} )}
<div className="w-full flex-grow flex flex-row rounded-lg"> <div className="w-full flex-grow flex flex-row rounded-lg">
<div className="w-full flex flex-row flex-grow bg-white rounded-lg border border-gray-300 relative"> <div className="w-full flex flex-row flex-grow bg-white rounded-lg border border-gray-300 relative ">
<ScrollArea className="flex-grow"> <ScrollArea className="flex-grow">
<Form <Form
{...{ {...{