Skip to content

Commit

Permalink
Merge pull request #58 from abusix/pla-791-fixed-width-for-set-up-dialog
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove width and height from dialog parent element
  • Loading branch information
mnlfischer authored Nov 21, 2023
2 parents 582a3f9 + 9f3601b commit b1e5a2c
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export interface DialogProps {
title?: string;
onClose?: (submitted: boolean) => void;
isCloseable?: boolean;
height?: number;
width?: number;
className?: string;
children: React.ReactNode;
footer?: React.ReactNode | null;
Expand All @@ -27,18 +25,12 @@ export const Dialog = ({
footer,
footerPosition = "end",
onClose,
height,
width,
title,
hasBackground = true,
position = "center",
}: DialogProps): JSX.Element | null => {
const handleClose = (submitted = false) => {
if (!isCloseable) {
return;
}

if (onClose) {
if (isCloseable && onClose) {
onClose(submitted);
}
};
Expand Down Expand Up @@ -82,9 +74,7 @@ export const Dialog = ({
>
<HeadlessDialog.Panel
className={classNames(
"flex transform flex-col overflow-y-auto rounded-md bg-neutral-0 shadow-lg transition-all",
height ? `h-[${height}px]` : "max-h-full",
width ? `w-[${width}px]` : "w-[592px]",
"flex w-[736px] transform flex-col overflow-y-auto rounded-md bg-neutral-0 shadow-lg transition-all",
!footer && "pb-8",
className
)}
Expand Down

0 comments on commit b1e5a2c

Please sign in to comment.