Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Updates GuideGroupIndex in PageLayout to use CardContainer to display full width cards #519

Merged
merged 7 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Handle `NavigiationAccordion` when there is no `activeItem`. [#495](https://github.com/mapbox/dr-ui/pull/495)
- Updates `GuideGroupIndex` in `PageLayout` to use `CardContainer` to display full width cards. [#519](https://github.com/mapbox/dr-ui/pull/519)

## 4.2.3

Expand Down
31 changes: 15 additions & 16 deletions src/components/navigation-accordion/navigation-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,28 +123,27 @@ export default class NavigationAccordion extends React.Component {
const subItemEls = subItems
.filter((page) => !page.groupOrder || page.groupOrder === undefined)
.map((page) => (
<React.Fragment key={page.title}>
<li
// Required on parents containing tags to prevent unwanted scrollbars on IE
className={classnames('mb3', {
'scroll-hidden': page.tag
<li
key={page.title}
// Required on parents containing tags to prevent unwanted scrollbars on IE
className={classnames('mb3', {
'scroll-hidden': page.tag
})}
>
<a
className={classnames('inline-block w-full color-blue-on-hover', {
'color-blue': activeItem === page.path
})}
href={page.path}
>
<a
className={classnames('inline-block w-full color-blue-on-hover', {
'color-blue': activeItem === page.path
})}
href={page.path}
>
{page.title}
{page.tag && this.renderTag(page)}
</a>
</li>
{page.title}
{page.tag && this.renderTag(page)}
</a>
{activeItem &&
activeItem.includes(page.path) &&
page.subPages &&
this.renderSubPages(page.subPages, activeItem)}
</React.Fragment>
</li>
));

return (
Expand Down
Loading