Skip to content

Commit

Permalink
Docs(web-twig): Demonstrate composition of Header with Dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkudrna committed Sep 26, 2023
1 parent e32b945 commit c2e8601
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
{% include '@components/Header/stories/HeaderInvertedWithActions.twig' %}
</DocsSection>

<DocsSection title="Inverted Header with Actions and Dropdown" stackAlignment="stretch">
{% include '@components/Header/stories/HeaderInvertedWithActionsAndDropdown.twig' %}
</DocsSection>

<DocsSection title="Inverted Header with Actions and Header Dialog" stackAlignment="stretch">
{% include '@components/Header/stories/HeaderInvertedWithActionsAndDialog.twig' %}
</DocsSection>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<Header color="inverted">
{% include '@components/Header/stories/_partials/SpiritLogo.twig' %}

<HeaderMobileActions dialogId="header_dialog_example_3_main_navigation">
<DropdownWrapper>
<Button
color="inverted"
data-spirit-toggle="dropdown"
data-spirit-target="#dropdownUserMobile"
isSquare
>
<Icon name="profile" />
<VisuallyHidden>My Profile</VisuallyHidden>
</Button>
<Dropdown id="dropdownUserMobile" placement="bottom-right">
<Stack hasSpacing>
<a href="#">Dashboard</a>
<a href="#">Profile</a>
<a href="#">Favourites</a>
<a href="#">Notifications</a>
<a href="#">Sign out</a>
</Stack>
</Dropdown>
</DropdownWrapper>
</HeaderMobileActions>

<HeaderDesktopActions aria-label="Main navigation">
<HeaderNav>
<HeaderNavItem>
<HeaderLink href="#" isCurrent>Job offers</HeaderLink>
</HeaderNavItem>
<HeaderNavItem>
<HeaderLink href="#">Part-time jobs</HeaderLink>
</HeaderNavItem>
<HeaderNavItem>
<HeaderLink href="#">Inspiration</HeaderLink>
</HeaderNavItem>
<HeaderNavItem>
<HeaderLink href="#">Replies</HeaderLink>
</HeaderNavItem>
<HeaderNavItem>
<HeaderLink href="#">Employers</HeaderLink>
</HeaderNavItem>
</HeaderNav>
</HeaderDesktopActions>

<HeaderDesktopActions color="secondary">
<HeaderNav>
<HeaderNavItem UNSAFE_style="position: relative;">
<HeaderLink
href="#"
data-spirit-toggle="dropdown"
data-spirit-target="#dropdownUserDesktop"
>
Marian
</HeaderLink>
<Dropdown id="dropdownUserDesktop" placement="bottom-right">
<Stack hasSpacing>
<a href="#">Dashboard</a>
<a href="#">Profile</a>
<a href="#">Favourites</a>
<a href="#">Notifications</a>
<a href="#">Sign out</a>
</Stack>
</Dropdown>
</HeaderNavItem>
</HeaderNav>
</HeaderDesktopActions>
</Header>

<HeaderDialog id="header_dialog_example_3_main_navigation">
<HeaderDialogCloseButton dialogId="header_dialog_example_3_main_navigation" />
<HeaderDialogActions aria-label="Main navigation">
<HeaderDialogNav>
<HeaderDialogNavItem>
<HeaderDialogLink href="/" isCurrent>Job offers</HeaderDialogLink>
</HeaderDialogNavItem>
<HeaderDialogNavItem>
<HeaderDialogLink href="/">Part-time jobs</HeaderDialogLink>
</HeaderDialogNavItem>
<HeaderDialogNavItem>
<HeaderDialogLink href="/">Inspiration</HeaderDialogLink>
</HeaderDialogNavItem>
<HeaderDialogNavItem>
<HeaderDialogLink href="/">Replies</HeaderDialogLink>
</HeaderDialogNavItem>
<HeaderDialogNavItem>
<HeaderDialogLink href="/">Employers</HeaderDialogLink>
</HeaderDialogNavItem>
</HeaderDialogNav>
</HeaderDialogActions>
</HeaderDialog>

0 comments on commit c2e8601

Please sign in to comment.