mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
make divider show up between breadcrumbs
This commit is contained in:
@@ -30,19 +30,21 @@ const Breadcrumbs = ({ breadcrumbConfig }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const Crumb = ({ breadcrumbConfig }) => {
|
const Crumb = ({ breadcrumbConfig, showDivider }) => {
|
||||||
const match = useRouteMatch();
|
const match = useRouteMatch();
|
||||||
const crumb = breadcrumbConfig[match.url];
|
const crumb = breadcrumbConfig[match.url];
|
||||||
|
|
||||||
let crumbElement = (
|
let crumbElement = (
|
||||||
<BreadcrumbItem key={match.url}>
|
<BreadcrumbItem key={match.url} showDivider={showDivider}>
|
||||||
<Link to={match.url}>{crumb}</Link>
|
<Link to={match.url}>{crumb}</Link>
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (match.isExact) {
|
if (match.isExact) {
|
||||||
crumbElement = (
|
crumbElement = (
|
||||||
<BreadcrumbHeading key="breadcrumb-heading">{crumb}</BreadcrumbHeading>
|
<BreadcrumbHeading key="breadcrumb-heading" showDivider={showDivider}>
|
||||||
|
{crumb}
|
||||||
|
</BreadcrumbHeading>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ const Crumb = ({ breadcrumbConfig }) => {
|
|||||||
<Fragment>
|
<Fragment>
|
||||||
{crumbElement}
|
{crumbElement}
|
||||||
<Route path={`${match.url}/:path`}>
|
<Route path={`${match.url}/:path`}>
|
||||||
<Crumb breadcrumbConfig={breadcrumbConfig} />
|
<Crumb breadcrumbConfig={breadcrumbConfig} showDivider />
|
||||||
</Route>
|
</Route>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user