Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Color

Manav Rathia0df76c2c352
diff --git a/web/packages/new/photos/components/Gallery/ListHeader.tsx b/web/packages/new/photos/components/Gallery/ListHeader.tsx
index 89e35cfa99..787da61a9f 100644
--- a/web/packages/new/photos/components/Gallery/ListHeader.tsx
+++ b/web/packages/new/photos/components/Gallery/ListHeader.tsx
@@ -1,10 +1,18 @@
-import { Box, Stack, styled, Typography } from "@mui/material";
+import {
+ Box,
+ Stack,
+ styled,
+ Typography,
+ type TypographyProps,
+} from "@mui/material";
import { t } from "i18next";
import React from "react";
interface GalleryItemsSummaryProps {
/** The name / title for the items that are being shown. */
name: string;
+ /** Extra props to pass to the Typography component that shows the name. */
+ nameProps?: TypographyProps;
/** The number of items being shown. */
fileCount: number;
/** An element (usually an icon) placed after the file count. */
@@ -17,12 +25,15 @@ interface GalleryItemsSummaryProps {
*/
export const GalleryItemsSummary: React.FC<GalleryItemsSummaryProps> = ({
name,
+ nameProps,
fileCount,
endIcon,
}) => {
return (
<div>
- <Typography variant="h3">{name}</Typography>
+ <Typography variant="h3" {...(nameProps ?? {})}>
+ {name}
+ </Typography>
<Stack
direction="row"
diff --git a/web/packages/new/photos/components/Gallery/index.tsx b/web/packages/new/photos/components/Gallery/index.tsx
index 25dfbf49ee..485965b8d0 100644
--- a/web/packages/new/photos/components/Gallery/index.tsx
+++ b/web/packages/new/photos/components/Gallery/index.tsx
@@ -50,6 +50,7 @@ export const PersonListHeader: React.FC<PeopleListHeaderProps> = ({
<SpaceBetweenFlex>
<GalleryItemsSummary
name={person.name ?? "Unnamed person"}
+ nameProps={person.name ? {} : { color: "text.muted" }}
fileCount={person.fileIDs.length}
/>
{hasOptions && (