Removed inline styling from breadcrumbs

Signed-off-by: Harrison Hogg <hhogg@spotify.com>
This commit is contained in:
Harrison Hogg
2024-03-01 16:12:49 +01:00
parent 9e009d80dc
commit 5c271fa512
4 changed files with 22 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Removed inline styling in breadcrumbs and replaced with a theme targetable class of BreadcrumbsCurrentPage
+3
View File
@@ -136,6 +136,9 @@ export function Breadcrumbs(props: Props_18): React_2.JSX.Element;
// @public (undocumented)
export type BreadcrumbsClickableTextClassKey = 'root';
// @public (undocumented)
export type BreadcrumbsCurrentPageClassKey = 'root';
// @public (undocumented)
export type BreadcrumbsStyledBoxClassKey = 'root';
@@ -51,6 +51,18 @@ const StyledBox = withStyles(
{ name: 'BackstageBreadcrumbsStyledBox' },
)(Box);
/** @public */
export type BreadcrumbsCurrentPageClassKey = 'root';
const BreadcrumbsCurrentPage = withStyles(
{
root: {
fontStyle: 'italic',
},
},
{ name: 'BreadcrumbsCurrentPage' },
)(Box);
/**
* Breadcrumbs component to show navigation hierarchical structure
*
@@ -88,7 +100,7 @@ export function Breadcrumbs(props: Props) {
{hasHiddenBreadcrumbs && (
<ClickableText onClick={handleClick}>...</ClickableText>
)}
<Box style={{ fontStyle: 'italic' }}>{currentPage}</Box>
<BreadcrumbsCurrentPage>{currentPage}</BreadcrumbsCurrentPage>
</MaterialBreadcrumbs>
<Popover
open={open}
@@ -18,4 +18,5 @@ export { Breadcrumbs } from './Breadcrumbs';
export type {
BreadcrumbsClickableTextClassKey,
BreadcrumbsStyledBoxClassKey,
BreadcrumbsCurrentPageClassKey,
} from './Breadcrumbs';