fix: modal footer issue (#10020)

Co-authored-by: Raghul D <v-raghuld@microsoft.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
pull/10149/head^2
Raghul 2023-07-18 01:32:34 +05:30 committed by GitHub
parent 2ac709630f
commit 4d7a3ac21a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -77,14 +77,14 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
<DialogPrimitive.Content
{...props}
className={classNames(
"fadeIn bg-default fixed left-1/2 top-1/2 z-50 w-full max-w-[22rem] -translate-x-1/2 -translate-y-1/2 rounded-md text-left shadow-xl focus-visible:outline-none sm:align-middle",
"fadeIn bg-default scroll-bar fixed left-1/2 top-1/2 z-50 w-full max-w-[22rem] -translate-x-1/2 -translate-y-1/2 rounded-md px-8 pb-0 pt-8 text-left shadow-xl focus-visible:outline-none sm:align-middle",
props.size == "xl"
? "p-8 sm:max-w-[90rem]"
? "sm:max-w-[90rem]"
: props.size == "lg"
? "p-8 sm:max-w-[70rem]"
? "sm:max-w-[70rem]"
: props.size == "md"
? "p-8 sm:max-w-[48rem]"
: "p-8 sm:max-w-[35rem]",
? "sm:max-w-[48rem]"
: "sm:max-w-[35rem]",
"max-h-[95vh]",
enableOverflow ? "overflow-auto" : "overflow-visible",
`${props.className || ""}`
@ -141,13 +141,13 @@ export function DialogFooter(props: {
customDividerClassNames?: string;
}) {
return (
<div className={classNames("bg-default", props.className)}>
<div className={classNames("bg-default sticky bottom-0", props.className)}>
{props.showDivider && (
<hr className={classNames("border-subtle absolute right-0 w-full", props.customDividerClassNames)} />
<hr className={classNames("border-subtle -mx-8", props.customDividerClassNames)} />
)}
<div
className={classNames(
"flex justify-end space-x-2 pt-4 rtl:space-x-reverse",
"flex justify-end space-x-2 pb-4 pt-4 rtl:space-x-reverse",
props.showDivider && "-mb-4"
)}>
{props.children}