fix: add allowScroll prop (#6215)
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/6219/head
parent
3535a25a59
commit
518a4484d6
|
@ -182,7 +182,7 @@ const DateOverrideInputDialog = ({
|
|||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>{Trigger}</DialogTrigger>
|
||||
<DialogContent size="md">
|
||||
<DialogContent allowScroll={true} size="md">
|
||||
<DateOverrideForm
|
||||
excludedDates={excludedDates}
|
||||
{...passThroughProps}
|
||||
|
|
|
@ -59,6 +59,7 @@ type DialogContentProps = React.ComponentProps<typeof DialogPrimitive["Content"]
|
|||
closeText?: string;
|
||||
actionDisabled?: boolean;
|
||||
Icon?: SVGComponent;
|
||||
allowScroll?: boolean;
|
||||
};
|
||||
|
||||
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
|
||||
|
@ -78,7 +79,8 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
|
|||
: props.size == "md"
|
||||
? "p-8 sm:max-w-[48rem]"
|
||||
: "p-8 sm:max-w-[35rem]",
|
||||
"overflow-y-auto overscroll-auto md:h-auto md:max-h-[inherit]",
|
||||
"max-h-[560px] overscroll-auto md:h-auto md:max-h-[inherit]",
|
||||
props.allowScroll ? "overflow-y-auto" : "overflow-visible",
|
||||
`${props.className || ""}`
|
||||
)}
|
||||
ref={forwardedRef}>
|
||||
|
|
Loading…
Reference in New Issue