fix: show link icon for bound text containers (#4960)

This commit is contained in:
Aakansha Doshi 2022-03-23 00:45:08 +05:30 committed by GitHub
parent ed31980f84
commit 2209e2c1e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")}
</div>
</fieldset>
)}