From 9d41499c27b323685376cbcc89a511c0ccb81b59 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Tue, 31 Mar 2026 15:37:56 -0600 Subject: [PATCH] added an optional param to the object users and object teams to use a button with a label and use the share icon when it isn't there --- src/pages/Team.tsx | 1 + src/teams/ObjectTeams.tsx | 22 +++++++++++++++------- src/user/ObjectUsers.tsx | 16 ++++++++++++---- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/pages/Team.tsx b/src/pages/Team.tsx index 593b152..f17d965 100644 --- a/src/pages/Team.tsx +++ b/src/pages/Team.tsx @@ -247,6 +247,7 @@ export default function TeamPage() { closeDialogCallback={() => setUserDialog(false)} refreshCallback={() => {}} useImitation={false} + shareLabel="Add Team Member +" /> diff --git a/src/teams/ObjectTeams.tsx b/src/teams/ObjectTeams.tsx index 9c80fbc..2e0c610 100644 --- a/src/teams/ObjectTeams.tsx +++ b/src/teams/ObjectTeams.tsx @@ -104,6 +104,7 @@ interface Props { cardMode?: boolean; keys?: string[]; types?: string[]; + shareLabel?: string; // a custom label to pass in that will replace the share icon } export default function ObjectTeams(props: Props) { @@ -126,7 +127,8 @@ export default function ObjectTeams(props: Props) { dialog, cardMode, keys, - types + types, + shareLabel } = props; const prevPermissions = usePrevious(permissions); const prevIsDialogOpen = usePrevious(isDialogOpen); @@ -322,12 +324,18 @@ export default function ObjectTeams(props: Props) { {canShare && ( - - - + {shareLabel ? + + : + + + + } )} diff --git a/src/user/ObjectUsers.tsx b/src/user/ObjectUsers.tsx index e3221c2..981a838 100644 --- a/src/user/ObjectUsers.tsx +++ b/src/user/ObjectUsers.tsx @@ -108,6 +108,7 @@ interface Props { dialog?: string; cardMode?: boolean; useImitation?: boolean; + shareLabel?: string; // s string to replace the share icon button with a labelled button } export default function ObjectUsers(props: Props) { @@ -127,8 +128,9 @@ export default function ObjectUsers(props: Props) { refreshCallback, userCallback, dialog, - cardMode + cardMode, //useImitation + shareLabel } = props; const prevPermissions = usePrevious(permissions); const prevIsDialogOpen = usePrevious(isDialogOpen); @@ -367,11 +369,17 @@ export default function ObjectUsers(props: Props) { {canShare && ( - + {shareLabel} + + : + - - + + + } )}