Remove default props

This commit is contained in:
Manav Rathi
2024-07-20 20:13:14 +05:30
parent e55de904b4
commit 1c0261bc5c
9 changed files with 19 additions and 8 deletions

View File

@@ -47,6 +47,8 @@ export function PublicLinkSetPassword({
BackdropProps={{ sx: { position: "absolute" } }}
sx={{ position: "absolute" }}
PaperProps={{ sx: { p: 1 } }}
maxWidth={"sm"}
fullWidth
>
<Stack spacing={3} p={1.5}>
<Typography variant="h3" px={1} py={0.5} fontWeight={"bold"}>

View File

@@ -156,7 +156,12 @@ export default function ExportModal(props: Props) {
};
return (
<Dialog open={props.show} onClose={props.onHide} maxWidth="xs">
<Dialog
open={props.show}
onClose={props.onHide}
maxWidth="xs"
fullWidth
>
<DialogTitleWithCloseButton onClose={props.onHide}>
{t("EXPORT_DATA")}
</DialogTitleWithCloseButton>

View File

@@ -49,10 +49,10 @@ export function MemberSubscriptionManage({ open, userDetails, onClose }) {
return (
<Dialog
fullWidth
open={open}
onClose={onClose}
maxWidth="xs"
fullWidth
fullScreen={isMobile}
>
<DialogTitleWithCloseButton onClose={onClose}>

View File

@@ -21,7 +21,7 @@ export const CollectionMappingChoiceModal: React.FC<
const handleClose = dialogCloseHandler({ onClose });
return (
<Dialog open={open} onClose={handleClose}>
<Dialog open={open} onClose={handleClose} maxWidth={"sm"} fullWidth>
<DialogTitleWithCloseButton onClose={onClose}>
{t("MULTI_FOLDER_UPLOAD")}
</DialogTitleWithCloseButton>

View File

@@ -41,7 +41,7 @@ export function UploadProgressDialog() {
const handleClose = dialogCloseHandler({ staticBackdrop: true, onClose });
return (
<Dialog maxWidth="xs" open={open} onClose={handleClose}>
<Dialog open={open} onClose={handleClose} maxWidth="xs" fullWidth>
<UploadProgressHeader />
{(uploadStage === UPLOAD_STAGES.UPLOADING ||
uploadStage === UPLOAD_STAGES.FINISH ||

View File

@@ -46,6 +46,7 @@ export const DevSettings: React.FC<DevSettingsProps> = ({ open, onClose }) => {
onClose={handleDialogClose}
TransitionComponent={SlideTransition}
maxWidth="xs"
fullWidth
>
<Contents {...{ onClose }} />
</Dialog>

View File

@@ -40,6 +40,7 @@ export const WhatsNew: React.FC<WhatsNewProps> = ({ open, onClose }) => {
{...{ open, fullScreen }}
TransitionComponent={SlideTransition}
maxWidth="xs"
fullWidth
>
<Box m={1}>
<DialogTitle mt={2}>

View File

@@ -57,6 +57,12 @@ function RecoveryKey({ somethingWentWrong, isMobile, ...props }: Props) {
fullScreen={isMobile}
open={props.show}
onClose={props.onHide}
// [Note: maxWidth "xs" on MUI dialogs]
//
// While logically the "xs" breakpoint doesn't make sense as a
// maxWidth value (since as a breakpoint it's value is 0), in
// practice MUI has hardcoded its value to a reasonable 444px.
// https://github.com/mui/material-ui/issues/34646.
maxWidth="xs"
>
<DialogTitleWithCloseButton onClose={props.onHide}>

View File

@@ -62,10 +62,6 @@ export const getComponents = (
},
},
},
defaultProps: {
fullWidth: true,
maxWidth: "sm",
},
},
MuiPaper: {
styleOverrides: { root: { backgroundImage: "none" } },