This commit is contained in:
Manav Rathi
2024-07-10 11:02:01 +05:30
parent fde6e14440
commit eb271088a4
15 changed files with 19 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import { MenuItemDivider, MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import log from "@/next/log";
import { ensure } from "@/utils/ensure";
import { CenteredFlex } from "@ente/shared/components/Container";

View File

@@ -1,4 +1,4 @@
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { DialogProps, Stack } from "@mui/material";
import { EnteDrawer } from "components/EnteDrawer";
import { t } from "i18next";

View File

@@ -3,7 +3,7 @@ import {
MenuItemGroup,
MenuSectionTitle,
} from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import Add from "@mui/icons-material/Add";
import AdminPanelSettingsIcon from "@mui/icons-material/AdminPanelSettings";

View File

@@ -1,5 +1,5 @@
import { MenuItemDivider, MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import log from "@/next/log";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import BlockIcon from "@mui/icons-material/Block";

View File

@@ -1,4 +1,4 @@
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { DialogProps, Stack } from "@mui/material";
import { EnteDrawer } from "components/EnteDrawer";
import { CollectionSummaryType } from "constants/collection";

View File

@@ -1,5 +1,5 @@
import { MenuItemDivider, MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import ChevronRight from "@mui/icons-material/ChevronRight";
import { DialogProps, Stack } from "@mui/material";

View File

@@ -1,5 +1,5 @@
import { MenuItemDivider, MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
import RemoveCircleOutline from "@mui/icons-material/RemoveCircleOutline";

View File

@@ -1,5 +1,5 @@
import { MenuItemDivider, MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import { formatDateTime } from "@ente/shared/time/format";
import ChevronRight from "@mui/icons-material/ChevronRight";

View File

@@ -1,4 +1,4 @@
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import CopyButton from "@ente/shared/components/CodeBlock/CopyButton";
import { formatDateTimeFull } from "@ente/shared/time/format";
import { Box, Stack, styled, Typography } from "@mui/material";

View File

@@ -1,7 +1,7 @@
import { UnidentifiedFaces } from "@/new/photos/components/PeopleList";
import { isMLEnabled } from "@/new/photos/services/ml";
import { EnteFile } from "@/new/photos/types/file";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import CopyButton from "@ente/shared/components/CodeBlock/CopyButton";
import { FlexWrapper } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";

View File

@@ -1,5 +1,5 @@
import { MenuItemGroup, MenuSectionTitle } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import ChevronRight from "@mui/icons-material/ChevronRight";
import ScienceIcon from "@mui/icons-material/Science";

View File

@@ -1,5 +1,5 @@
import { MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import log from "@/next/log";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import {

View File

@@ -1,4 +1,4 @@
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import {
getLocaleInUse,
setLocaleInUse,

View File

@@ -5,7 +5,7 @@ import {
isMLEnabled,
} from "@/new/photos/services/ml";
import { MenuItemGroup } from "@/new/shared/components/Menu";
import Titlebar from "@/new/shared/components/Titlebar";
import { Titlebar } from "@/new/shared/components/Titlebar";
import log from "@/next/log";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import {

View File

@@ -2,8 +2,9 @@ import { FlexWrapper } from "@ente/shared/components/Container";
import ArrowBack from "@mui/icons-material/ArrowBack";
import Close from "@mui/icons-material/Close";
import { Box, IconButton, Typography } from "@mui/material";
import React from "react";
interface Iprops {
interface TitlebarProps {
title: string;
caption?: string;
onClose: () => void;
@@ -12,14 +13,14 @@ interface Iprops {
actionButton?: JSX.Element;
}
export default function Titlebar({
export const Titlebar: React.FC<TitlebarProps> = ({
title,
caption,
onClose,
backIsClose,
actionButton,
onRootClose,
}: Iprops): JSX.Element {
}) => {
return (
<>
<FlexWrapper
@@ -56,4 +57,4 @@ export default function Titlebar({
</Box>
</>
);
}
};