diff --git a/web/apps/photos/src/components/ExportPendingList.tsx b/web/apps/photos/src/components/ExportPendingList.tsx index 6e52223d06..266bb0e221 100644 --- a/web/apps/photos/src/components/ExportPendingList.tsx +++ b/web/apps/photos/src/components/ExportPendingList.tsx @@ -58,7 +58,7 @@ const ExportPendingList = (props: Iprops) => { ( - -))({ +const FileInfoSidebar = styled( + (props: Pick) => ( + + ), +)({ zIndex: fileInfoDrawerZIndex, "& .MuiPaper-root": { padding: 8, diff --git a/web/packages/base/components/MiniDialog.tsx b/web/packages/base/components/MiniDialog.tsx index ae71208490..6651f9b30d 100644 --- a/web/packages/base/components/MiniDialog.tsx +++ b/web/packages/base/components/MiniDialog.tsx @@ -143,7 +143,7 @@ export interface MiniDialogAttributes { buttonDirection?: "row" | "column"; } -type MiniDialogProps = Omit & { +type MiniDialogProps = Pick & { onClose: () => void; attributes?: MiniDialogAttributes; }; @@ -158,7 +158,7 @@ type MiniDialogProps = Omit & { */ export const AttributedMiniDialog: React.FC< React.PropsWithChildren -> = ({ open, onClose, attributes, children, ...props }) => { +> = ({ open, onClose, sx, attributes, children }) => { const [phase, setPhase] = useState< "loading" | "secondary-loading" | "failed" | undefined >(); @@ -199,8 +199,6 @@ export const AttributedMiniDialog: React.FC< ]; })(attributes.cancel); - const { PaperProps, ...rest } = props; - const loadingButton = attributes.continue && ( {(attributes.icon ?? attributes.title) ? ( & { +type TitledMiniDialogProps = Pick & { onClose: () => void; /** * The dialog's title. */ title?: React.ReactNode; + /** + * Optional max width of the underlying MUI {@link Paper}. + * + * Default: 360px (same as {@link AttributedMiniDialog}). + */ + paperMaxWidth?: string; }; /** @@ -366,27 +367,18 @@ type TitledMiniDialogProps = Omit & { */ export const TitledMiniDialog: React.FC< React.PropsWithChildren -> = ({ open, onClose, title, children, ...props }) => { - const { PaperProps, ...rest } = props; - - return ( - - - {title} - - {children} - - ); -}; +> = ({ open, onClose, sx, paperMaxWidth, title, children }) => ( + + + {title} + + {children} + +);