Skip to content

Commit 7424585

Browse files
Merge pull request #650 from sudhanshutech/style/modal
Fix style using `maxWidth` prop for modals
2 parents d16e206 + 759897f commit 7424585

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/custom/Modal/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ const CloseBtn = styled(IconButton)`
4949
const StyledDialog = styled(Dialog)`
5050
&& {
5151
.MuiDialog-paper {
52-
width: auto;
53-
max-width: 100%;
5452
border-radius: 0.5rem;
5553
}
5654
}
@@ -128,10 +126,13 @@ export const Modal: React.FC<ModalProps> = ({
128126
headerIcon,
129127
reactNode,
130128
children,
129+
maxWidth = 'xs',
131130
...props
132131
}) => {
133132
return (
134133
<StyledDialog
134+
fullWidth={true}
135+
maxWidth={maxWidth}
135136
open={open}
136137
onClose={closeModal}
137138
aria-labelledby="alert-dialog-slide-title"

0 commit comments

Comments
 (0)