aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/design-system/src/components/Breadcrumbs.tsx
diff options
context:
space:
mode:
author7PH <benjamin.raymond@sonarsource.com>2023-06-01 10:09:39 +0200
committersonartech <sonartech@sonarsource.com>2023-06-05 20:02:48 +0000
commit81400607613b2a4a2bb4bcee875eb39c805b77c1 (patch)
tree5bf2ec2678573aade8f9118e623d2e9da3a1dfce /server/sonar-web/design-system/src/components/Breadcrumbs.tsx
parent76b6ef07b14ca6769d65cba7ee12c178427a60a9 (diff)
downloadsonarqube-81400607613b2a4a2bb4bcee875eb39c805b77c1.tar.gz
sonarqube-81400607613b2a4a2bb4bcee875eb39c805b77c1.zip
SONAR-19391 Measures page's header for the source viewer should be moved to the new UI
Diffstat (limited to 'server/sonar-web/design-system/src/components/Breadcrumbs.tsx')
-rw-r--r--server/sonar-web/design-system/src/components/Breadcrumbs.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/sonar-web/design-system/src/components/Breadcrumbs.tsx b/server/sonar-web/design-system/src/components/Breadcrumbs.tsx
index 056cde51d59..be9238b0222 100644
--- a/server/sonar-web/design-system/src/components/Breadcrumbs.tsx
+++ b/server/sonar-web/design-system/src/components/Breadcrumbs.tsx
@@ -38,6 +38,7 @@ import { ChevronDownIcon, ChevronRightIcon } from './icons';
const WIDTH_OF_BREADCRUMB_DROPDOWN = 32;
interface Props {
+ actions?: React.ReactNode;
ariaLabel?: string;
breadcrumbLimit?: number;
children: React.ReactNode;
@@ -55,6 +56,7 @@ export function Breadcrumbs(props: Props) {
children,
expandButtonLabel,
innerRef,
+ actions,
maxWidth = LAYOUT_VIEWPORT_MAX_WIDTH_LARGE,
} = props;
const [lengthOfChildren, setLengthOfChildren] = React.useState<number[]>([]);
@@ -160,6 +162,7 @@ export function Breadcrumbs(props: Props) {
</Dropdown>
)}
<ul className="sw-truncate sw-leading-6 sw-flex">{[...breadcrumbsToShow].reverse()}</ul>
+ {actions && <div className="sw-ml-2">{actions}</div>}
</BreadcrumbWrapper>
);
}