Skip to content

Commit

Permalink
pr updates
Browse files Browse the repository at this point in the history
Signed-off-by: kaddy645 <xdeskart@amazon.com>
  • Loading branch information
kaddy645 committed Jul 28, 2022
1 parent a7284d9 commit 37275cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/core/public/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "@elastic/eui/src/global_styling/variables/header";

$osdHeaderOffset: $euiHeaderHeightCompensation;
$osdPacificSky: #b9d9eb;
$osdSanFranciscoFog: #d9e1e2;
$osdMidnightSky: #002a3a;
$osdHeaderBreadcrumbBlueBackground: #b9d9eb;
$osdHeaderBreadcrumbGrayBackground: #d9e1e2;
$osdHeaderBreadcrumbCollapsedLink: #002a3a;
14 changes: 7 additions & 7 deletions src/core/public/chrome/ui/header/header_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
filter: url("../../public/assets/round_filter.svg#round");

.osdBreadcrumbs.first {
@include background($osdSanFranciscoFog,
@include background($osdHeaderBreadcrumbGrayBackground,
polygon(
0% 0%,
100% 0%,
Expand All @@ -20,17 +20,17 @@
}

.osdBreadcrumbs.middle {
@include background($osdSanFranciscoFog,
@include background($osdHeaderBreadcrumbGrayBackground,
polygon(
$euiSizeS 0%,
100% 0%,
calc(100% - #{$euiSizeS}) 100%,
calc(100% - #{$euiSizeS}) 100%,
0% 100%
));
}

.osdBreadcrumbs.last {
@include background($osdPacificSky,
@include background($osdHeaderBreadcrumbBlueBackground,
polygon(
$euiSizeS 0%,
100% 0%,
Expand All @@ -40,11 +40,11 @@
}

.osdBreadcrumbs.first.last {
@include background($osdPacificSky,
@include background($osdHeaderBreadcrumbBlueBackground,
polygon(
0% 0%,
100% 0%,
calc(100% - #{$euiSizeS})100%,
calc(100% - #{$euiSizeS}) 100%,
0% 100%
));
}
Expand All @@ -54,7 +54,7 @@
}

.euiBreadcrumb__collapsedLink {
color: $osdMidnightSky;
color: $osdHeaderBreadcrumbCollapsedLink;
background: $euiColorEmptyShade;
}

Expand Down
8 changes: 5 additions & 3 deletions src/core/public/chrome/ui/header/header_breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$ }: Props) {
if (breadcrumbs.length === 0 && appTitle) {
crumbs = [{ text: appTitle }];
}


const crumbsLength = crumbs.length;

crumbs = crumbs.map((breadcrumb, i) => ({
...breadcrumb,
'data-test-subj': classNames(
Expand All @@ -62,8 +64,8 @@ export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$ }: Props) {
className: classNames(
'osdBreadcrumbs',
i === 0 && 'first',
i > 0 && i < crumbs.length - 1 && 'middle',
i === crumbs.length - 1 && 'last'
i > 0 && i < crumbsLength - 1 && 'middle',
i === crumbsLength - 1 && 'last'
),
}));

Expand Down

0 comments on commit 37275cc

Please sign in to comment.