From 2209e2c1e80d842689041a4ee84a810e04390698 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Wed, 23 Mar 2022 00:45:08 +0530 Subject: [PATCH] fix: show link icon for bound text containers (#4960) --- src/components/Actions.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 6482483c..9ce29f07 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -64,6 +64,9 @@ export const SelectedShapeActions = ({ hasBackground(elementType) || targetElements.some((element) => hasBackground(element.type)); + const showLinkIcon = + targetElements.length === 1 || isSingleElementBoundContainer; + let commonSelectedType: string | null = targetElements[0]?.type || null; for (const element of targetElements) { @@ -177,7 +180,7 @@ export const SelectedShapeActions = ({ {!deviceType.isMobile && renderAction("deleteSelectedElements")} {renderAction("group")} {renderAction("ungroup")} - {targetElements.length === 1 && renderAction("hyperlink")} + {showLinkIcon && renderAction("hyperlink")} )}