From 60e144ab5e95b7122bea9feed0ed961da802efe9 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 23 Jan 2025 07:54:03 +0530 Subject: [PATCH] Children --- .../Collections/CollectionShare.tsx | 68 +++++++++---------- web/packages/base/components/RowButton.tsx | 13 ++-- 2 files changed, 37 insertions(+), 44 deletions(-) diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsx index f9a2089df3..14593f1871 100644 --- a/web/apps/photos/src/components/Collections/CollectionShare.tsx +++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx @@ -166,10 +166,9 @@ function SharingDetails({ collection, type }) { return ( <> - } - /> + }> + {t("OWNER")} + 0 && ( - } - /> + }> + {t("COLLABORATORS")} + {collaborators.map((item, index) => ( <> @@ -206,10 +204,9 @@ function SharingDetails({ collection, type }) { )} {viewers?.length > 0 && ( - } - /> + }> + {t("VIEWERS")} + {viewers.map((item, index) => ( <> @@ -286,10 +283,9 @@ const EnablePublicShareOptions: React.FC = ({ return ( - } - /> + }> + {t("LINK_SHARE_TITLE")} + = ({ collection, onRootClose }) => { return ( <> - }> + {t("shared_with_people_count", { count: collection.sharees?.length ?? 0, })} - icon={} - /> + {collection.sharees.length > 0 ? ( <> @@ -671,7 +666,9 @@ const AddParticipantForm: React.FC = (props) => { {props.hiddenPreInput} - + + {t("ADD_NEW_EMAIL")} + = (props) => { {props.optionsList.length > 0 && ( - + + {t("OR_ADD_EXISTING")} + {props.optionsList.map((item, index) => ( <> @@ -916,9 +913,10 @@ const ManageEmailShare: React.FC = ({ } - /> + > + {t("OWNER")} + = ({ - } - /> + }> + {t("COLLABORATORS")} + {collaborators.map((item) => ( <> @@ -962,10 +959,9 @@ const ManageEmailShare: React.FC = ({ - } - /> + }> + {t("VIEWERS")} + {viewers.map((item) => ( <> @@ -1508,7 +1504,9 @@ const ManagePublicCollect: React.FC = ({ label={t("PUBLIC_COLLECT")} /> - + + {t("PUBLIC_COLLECT_SUBTEXT")} + ); }; diff --git a/web/packages/base/components/RowButton.tsx b/web/packages/base/components/RowButton.tsx index 3df04ccc2d..ea57d4ed34 100644 --- a/web/packages/base/components/RowButton.tsx +++ b/web/packages/base/components/RowButton.tsx @@ -11,10 +11,6 @@ import { import React from "react"; interface RowButtonGroupTitleProps { - /** - * The title for the row button group. - */ - title: string; /** * An optional leading SvgIcon before the title. */ @@ -24,10 +20,9 @@ interface RowButtonGroupTitleProps { /** * A section title, meant to precede a {@link RowButtonGroup}. */ -export const RowButtonGroupTitle: React.FC = ({ - title, - icon, -}) => ( +export const RowButtonGroupTitle: React.FC< + React.PropsWithChildren +> = ({ children, icon }) => ( = ({ > {icon && icon} - {title} + {children} );