fix: react-select overflow issue in some modals. (#6587)
* feat: add a disable overflow prop * feat: use the disable overflow prop
This commit is contained in:
1 parent
fbc27e1d52
commit
00cab5c41f
3 files changed
+6
-4
No files matched your search
@@ -68,10 +68,11 @@ type DialogContentProps = React.ComponentProps<typeof DialogPrimitive["Content"]
|
||||
closeText?: string;
|
||||
actionDisabled?: boolean;
|
||||
Icon?: SVGComponent;
|
||||
disableOverflow?: boolean;
|
||||
};
|
||||
|
||||
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
|
||||
({ children, title, Icon, type = "creation", ...props }, forwardedRef) => {
|
||||
({ children, title, Icon, disableOverflow, type = "creation", ...props }, forwardedRef) => {
|
||||
return (
|
||||
<DialogPrimitive.Portal>
|
||||
<DialogPrimitive.Overlay className="fadeIn fixed inset-0 z-40 bg-gray-500 bg-opacity-75 transition-opacity" />
|
||||
@@ -87,7 +88,8 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
|
||||
: props.size == "md"
|
||||
? "p-8 sm:max-w-[48rem]"
|
||||
: "p-8 sm:max-w-[35rem]",
|
||||
"max-h-[95vh] overflow-auto",
|
||||
"max-h-[95vh]",
|
||||
disableOverflow ? "overflow-visible" : "overflow-auto",
|
||||
`${props.className || ""}`
|
||||
)}
|
||||
ref={forwardedRef}>
|
||||
|
||||
Reference in new issue
Block a user