|
1 | 1 | import type { Meta, StoryObj } from "@storybook/web-components"; |
2 | 2 | import { html } from "lit"; |
3 | 3 | import logoColourUrl from "../../../assets/svg/logo-colour.svg"; |
4 | | -import { CountrySwitcher } from "../../components/country-switcher/country-switcher.stories"; |
| 4 | +import { |
| 5 | + Compact as CompactCountrySwitcher, |
| 6 | + CountrySwitcher, |
| 7 | +} from "../../components/country-switcher/country-switcher.stories"; |
5 | 8 | import { Open as MenuToggle } from "../../components/menu-toggle/menu-toggle.stories"; |
6 | 9 | import { MobileNav } from "../../components/mobile-nav/mobile-nav.stories"; |
7 | | -import { Default as TitleBar } from "./title-bar/title-bar.stories"; |
| 10 | +import { |
| 11 | + Compact as CompactTitleBar, |
| 12 | + Default as TitleBar, |
| 13 | +} from "./title-bar/title-bar.stories"; |
8 | 14 | import { ToolNav } from "./tool-nav/tool-nav.stories"; |
9 | 15 |
|
10 | 16 | const meta: Meta = { |
@@ -80,3 +86,67 @@ export const Header: Story = { |
80 | 86 | </header> |
81 | 87 | `, |
82 | 88 | }; |
| 89 | + |
| 90 | +export const CompactHeader: Story = { |
| 91 | + args: { |
| 92 | + heading: "Tool Name", |
| 93 | + }, |
| 94 | + render: (args, context) => html` |
| 95 | + ${MobileNav.render({ ...args }, context)} |
| 96 | + <header class="iati-header iati-header--compact"> |
| 97 | + <div class="iati-header__section iati-header__section--first"> |
| 98 | + <div class="iati-header__container"> |
| 99 | + ${logo} |
| 100 | + <nav class="iati-header__general-nav"> |
| 101 | + <ul class="iati-piped-list"> |
| 102 | + <li> |
| 103 | + <a href="https://iatistandard.org/en/about/">About IATI</a> |
| 104 | + </li> |
| 105 | + <li> |
| 106 | + <a href="https://iatistandard.org/en/using-data/">Use Data</a> |
| 107 | + </li> |
| 108 | + <li> |
| 109 | + <a href="https://iatistandard.org/en/guidance/publishing-data/"> |
| 110 | + Publish Data |
| 111 | + </a> |
| 112 | + </li> |
| 113 | + <li> |
| 114 | + <a href="https://iatistandard.org/guidance/get-support/"> |
| 115 | + Contact |
| 116 | + </a> |
| 117 | + </li> |
| 118 | + </ul> |
| 119 | + </nav> |
| 120 | + </div> |
| 121 | + </div> |
| 122 | + <div |
| 123 | + class="iati-header__section iati-header__section--last iati-brand-background" |
| 124 | + > |
| 125 | + <div class="iati-header__container iati-brand-background__content"> |
| 126 | + <div class="iati-header__main-row"> |
| 127 | + <div class="iati-header__actions"> |
| 128 | + ${CompactCountrySwitcher.render?.call({ ...args })} |
| 129 | + <button |
| 130 | + class="iati-button iati-button--light iati-button--compact hide--mobile-nav" |
| 131 | + > |
| 132 | + <span>Help Docs</span> |
| 133 | + <i class="iati-icon iati-icon--info"></i> |
| 134 | + </button> |
| 135 | + <button |
| 136 | + class="iati-button iati-button--light iati-button--compact" |
| 137 | + > |
| 138 | + <span>Search</span> |
| 139 | + <i class="iati-icon iati-icon--search"></i> |
| 140 | + </button> |
| 141 | + ${MenuToggle.render?.call({ ...args })} |
| 142 | + </div> |
| 143 | + ${CompactTitleBar.render(args, context)} |
| 144 | + </div> |
| 145 | + </div> |
| 146 | + </div> |
| 147 | + </header> |
| 148 | + `, |
| 149 | + argTypes: { |
| 150 | + heading: { control: "text" }, |
| 151 | + }, |
| 152 | +}; |
0 commit comments