-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #854 from Financial-Times/header-right-aligned-sub…
…-navigation Add support for right aligned sub navigation in `dotcom-ui-header`
- Loading branch information
Showing
9 changed files
with
1,956 additions
and
7 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
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
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
44 changes: 44 additions & 0 deletions
44
packages/dotcom-ui-header/src/__stories__/story-data/profile.ts
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,44 @@ | ||
import anon from './anon' | ||
import drawerUK from './drawerUK' | ||
import editionsUK from './editionsUK' | ||
import navbarRight from './navbarRight' | ||
import navbarRightAnon from './navbarRightAnon' | ||
import navbarSimple from './navbarSimple' | ||
import navbarUK from './navbarUK' | ||
import subNavigation from './subNavigationProfile' | ||
import user from './user' | ||
|
||
import { THeaderProps } from '../../interfaces' | ||
|
||
const breadcrumb = subNavigation.ancestors.concat(subNavigation.item) | ||
const subsections = subNavigation.children | ||
|
||
const data: THeaderProps = { | ||
userIsAnonymous: false, | ||
userIsLoggedIn: true, | ||
showSubNavigation: true, | ||
showUserNavigation: false, | ||
showStickyHeader: true, | ||
data: { | ||
account: null, | ||
anon, | ||
breadcrumb, | ||
drawer: drawerUK, | ||
editions: editionsUK, | ||
footer: null, | ||
navbar: navbarUK, | ||
'navbar-right': navbarRight, | ||
'navbar-right-anon': navbarRightAnon, | ||
'navbar-simple': navbarSimple, | ||
subsections, | ||
'subsections-right': [ | ||
{ | ||
label: 'Sign Out', | ||
url: '#' | ||
} | ||
], | ||
user | ||
} | ||
} | ||
|
||
export default data |
27 changes: 27 additions & 0 deletions
27
packages/dotcom-ui-header/src/__stories__/story-data/subNavigationProfile.ts
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,27 @@ | ||
import { TNavMenuItem } from '@financial-times/dotcom-types-navigation' | ||
|
||
const item: TNavMenuItem = { | ||
label: 'Settings & Account', | ||
url: '/myaccount/personal-details', | ||
selected: true, | ||
submenu: null | ||
} | ||
|
||
const siblings: TNavMenuItem[] = [] | ||
|
||
const children: TNavMenuItem[] = [ | ||
{ | ||
label: 'Personal Details', | ||
url: '/myaccount/personal-details', | ||
submenu: null | ||
}, | ||
{ | ||
label: 'Licence', | ||
url: '/myaccount/licence', | ||
submenu: null | ||
} | ||
] | ||
|
||
const ancestors: TNavMenuItem[] = [] | ||
|
||
export default { item, siblings, children, ancestors } |
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
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.