From 6812980eba90ea1e6b3c13ebc7937b98a92111de Mon Sep 17 00:00:00 2001 From: Yash Oswal Date: Thu, 26 Sep 2024 15:29:14 +0530 Subject: [PATCH] feat(EntityRefLink): add disableTooltip prop to control tooltip visibility Signed-off-by: Yash Oswal --- .changeset/loud-hotels-tan.md | 5 +++++ plugins/catalog-react/report.api.md | 1 + .../src/components/EntityRefLink/EntityRefLink.tsx | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 .changeset/loud-hotels-tan.md diff --git a/.changeset/loud-hotels-tan.md b/.changeset/loud-hotels-tan.md new file mode 100644 index 0000000000..34890dfe97 --- /dev/null +++ b/.changeset/loud-hotels-tan.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': minor +--- + +Added a new prop, `disableTooltip` to the `EntityRefLink` component diff --git a/plugins/catalog-react/report.api.md b/plugins/catalog-react/report.api.md index fccc269e07..0fbb27e70e 100644 --- a/plugins/catalog-react/report.api.md +++ b/plugins/catalog-react/report.api.md @@ -456,6 +456,7 @@ export type EntityRefLinkProps = { title?: string; children?: React_2.ReactNode; hideIcon?: boolean; + disableTooltip?: boolean; } & Omit; // @public diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx index c5af47e870..10aa1976f5 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx @@ -39,6 +39,7 @@ export type EntityRefLinkProps = { title?: string; children?: React.ReactNode; hideIcon?: boolean; + disableTooltip?: boolean; } & Omit; /** @@ -55,6 +56,7 @@ export const EntityRefLink = forwardRef( title, children, hideIcon, + disableTooltip, ...linkProps } = props; const entityRoute = useEntityRoute(props.entityRef); @@ -65,6 +67,7 @@ export const EntityRefLink = forwardRef( defaultKind={defaultKind} defaultNamespace={defaultNamespace} hideIcon={hideIcon} + disableTooltip={disableTooltip} /> );