diff --git a/web/apps/photos/src/components/AuthenticateUserModal.tsx b/web/apps/photos/src/components/AuthenticateUserModal.tsx index e8d3c76626..0002760a82 100644 --- a/web/apps/photos/src/components/AuthenticateUserModal.tsx +++ b/web/apps/photos/src/components/AuthenticateUserModal.tsx @@ -102,9 +102,7 @@ export default function AuthenticateUserModal({ open={open} onClose={onClose} sx={{ position: "absolute" }} - attributes={{ - title: t("password"), - }} + title={t("password")} > = ({ {view == "choose" && ( diff --git a/web/apps/photos/src/components/Collections/CollectionNamer.tsx b/web/apps/photos/src/components/Collections/CollectionNamer.tsx index 7294b44ed6..0374b8dc14 100644 --- a/web/apps/photos/src/components/Collections/CollectionNamer.tsx +++ b/web/apps/photos/src/components/Collections/CollectionNamer.tsx @@ -42,9 +42,7 @@ export default function CollectionNamer({ attributes, ...props }: Props) { { open={open} onClose={onClose} fullScreen={isMobile} - attributes={{ - title: t("delete_account"), - }} + title={t("delete_account")} > initialValues={{ diff --git a/web/apps/photos/src/components/ExportPendingList.tsx b/web/apps/photos/src/components/ExportPendingList.tsx index 99690b2c61..667926afdd 100644 --- a/web/apps/photos/src/components/ExportPendingList.tsx +++ b/web/apps/photos/src/components/ExportPendingList.tsx @@ -62,9 +62,7 @@ const ExportPendingList = (props: Iprops) => { PaperProps={{ sx: { maxWidth: "444px" }, }} - attributes={{ - title: t("PENDING_ITEMS"), - }} + title={t("PENDING_ITEMS")} > & { onClose: () => void; - attributes?: DialogBoxV2Attributes; + /** + * The dialog's title. + * + * Usually this will be a string, but it can be any {@link ReactNode}. Note + * that it always gets wrapped in a Typography element to set the font + * style, so if your ReactNode wants to do its own thing, it'll need to + * reset or override these customizations. + */ + title?: React.ReactNode; } >; @@ -248,16 +244,12 @@ type DialogBoxV2Props = React.PropsWithChildren< * API for the notify/confirm case separately. */ export function DialogBoxV2({ - attributes, + title, children, open, onClose, ...props }: DialogBoxV2Props) { - if (!attributes) { - return <>; - } - const { PaperProps, ...rest } = props; return ( @@ -276,11 +268,9 @@ export function DialogBoxV2({ > - {attributes.title && ( - - {attributes.title} - - )} + + {title} + {children}