-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subnavigation rendered only when needed (#2982)
* update component and approve visual test * Changes as per comments * Commiting images * Deleting the backstop images * Changing as per comments * Fixed the issue with yarn test * Making changes as per comments * changing hideHorizontalSubNav to removeHorizontalSubNav * Added the parameters in _macro-options.md --------- Co-authored-by: Alessio Venturini <[email protected]> Co-authored-by: SriHV <[email protected]> Co-authored-by: SriHV <[email protected]>
- Loading branch information
1 parent
1eb719c
commit 366497d
Showing
9 changed files
with
232 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...er_example-header-external-with-sub-navigation-removed_0_document_0_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...der_example-header-external-with-sub-navigation-removed_0_document_1_tablet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...der_example-header-external-with-sub-navigation-removed_0_document_2_mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions
4
...onents_timeout-panel_example-panel-with-timeout-warning_0_document_2_mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
src/components/header/example-header-external-with-sub-navigation-removed.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
"fullWidth": true | ||
--- | ||
{% from "components/header/_macro.njk" import onsHeader %} | ||
|
||
{{ | ||
onsHeader({ | ||
"title": 'Service manual', | ||
"mastheadLogoUrl": '#0', | ||
"titleUrl": '#0', | ||
"navigation": { | ||
"id": 'main-nav', | ||
"ariaLabel": 'Main menu', | ||
"currentPath": [ '#design-system', '#patterns', '#access-codes' ], | ||
"currentPageTitle": 'Design system', | ||
"itemsList": [ | ||
{ | ||
"text": 'Service standard', | ||
"url": '#0' | ||
}, | ||
{ | ||
"text": 'Design system', | ||
"url": '#design-system' | ||
}, | ||
{ | ||
"text": 'Accessibility', | ||
"url": '#0' | ||
}, | ||
{ | ||
"text": 'Brand guidelines', | ||
"url": '#0' | ||
}, | ||
{ | ||
"text": 'Content style guide', | ||
"url": '#0' | ||
} | ||
], | ||
"toggleNavigationButton": { | ||
"text": 'Menu', | ||
"ariaLabel": 'Toggle menu' | ||
}, | ||
"subNavigation": { | ||
"id": 'sub-nav', | ||
"overviewURL": '#design-system', | ||
"overviewText": 'Overview', | ||
"ariaLabel": 'Section menu', | ||
"currentPath": '#access-codes', | ||
"removeHorizontalSubNav": true, | ||
"itemsList": [ | ||
{ | ||
"text": 'Guidance', | ||
"url": '#0' | ||
}, | ||
{ | ||
"text": 'Foundations', | ||
"url": '#0' | ||
}, | ||
{ | ||
"text": 'Components', | ||
"url": '#0' | ||
}, | ||
{ | ||
"text": 'Patterns', | ||
"url": '#patterns' | ||
} | ||
] | ||
} | ||
} | ||
}) | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.