Skip to content

Commit

Permalink
Update documentation for missing params in header component (#3219)
Browse files Browse the repository at this point in the history
* update macro.md file

* update macro

* update macro

* remove unused params
  • Loading branch information
precious-onyenaucheya-ons authored Jun 3, 2024
1 parent c7b0d16 commit 882c690
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions src/components/header/_macro-options.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
| Name | Type | Required | Description |
| --------------- | ------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| phase | `PhaseBanner` [_(ref)_](/components/phase-banner) | false | Settings to set the Phase banner component within the HTML `<header>` element |
| wide | boolean | false | Set to “true” to increase the maximum width of the layout container to 1280px |
| fullWidth | boolean | false | Set to “true” to increase the maximum width of the layout container to the full width of the viewport |
| classes | string | false | Classes to add to the wrapping `header` |
| variants | array or string | false | An array of values or single value (string) to adjust the component using available variants: “internal”, "neutral" and “description” |
| mastheadLogoUrl | string | false | Wraps the masthead logo in a link. Set the URL for the HTML `href` attribute for the link. |
| mastheadLogo | object`<MastheadLogo>` | false | Settings for a [custom organisation logo](#mastheadlogo) in the masthead. Defaults to the ONS logo. |
| language | object`<Language>` | false | Settings for the [language selector](#language) |
| serviceLinks | object`<ServiceLinks>` | false | Settings for the [service links](#servicelinks) in the masthead |
| title | string | true (unless `titleLogo` is set) | The title for the service |
| description | string | false | Tagline or description for the service |
| titleAsH1 | boolean | false | Override to wrap the header `title` in an `<h1>` heading |
| titleLogo | object`<TitleLogo>` | false | Settings for a [custom title logo](#titlelogo) in the header. |
| titleUrl | string | false | Wraps the title logo in a link. Set the URL for the HTML `href` attribute for the link. |
| button | object`<SignOutButton>` | false | Settings for the [sign out button](#signoutbutton) in the header used to exit a transactional service |
| navigation | array`<Navigation>` | false | Settings for the [main menu links](#navigation) |
| Name | Type | Required | Description |
| --------------------- | ------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| phase | `PhaseBanner` [_(ref)_](/components/phase-banner) | false | Settings to set the Phase banner component within the HTML `<header>` element |
| wide | boolean | false | Set to “true” to increase the maximum width of the layout container to 1280px |
| fullWidth | boolean | false | Set to “true” to increase the maximum width of the layout container to the full width of the viewport |
| classes | string | false | Classes to add to the wrapping `header` |
| variants | array or string | false | An array of values or single value (string) to adjust the component using available variants: “internal”, "neutral" and “description” |
| mastheadLogoUrl | string | false | Wraps the masthead logo in a link. Set the URL for the HTML `href` attribute for the link. |
| mastheadLogo | object`<MastheadLogo>` | false | Settings for a [custom organisation logo](#mastheadlogo) in the masthead. Defaults to the ONS logo. |
| language | object`<Language>` | false | Settings for the [language selector](#language) |
| serviceLinks | object`<ServiceLinks>` | false | Settings for the [service links](#servicelinks) in the masthead |
| title | string | true (unless `titleLogo` is set) | The title for the service |
| description | string | false | Tagline or description for the service |
| titleAsH1 | boolean | false | Override to wrap the header `title` in an `<h1>` heading |
| titleLogo | object`<TitleLogo>` | false | Settings for a [custom title logo](#titlelogo) in the header. |
| titleUrl | string | false | Wraps the title logo in a link. Set the URL for the HTML `href` attribute for the link. |
| button | object`<SignOutButton>` | false | Settings for the [sign out button](#signoutbutton) in the header used to exit a transactional service |
| navigation | array`<Navigation>` | false | Settings for the [main menu links](#navigation) |
| siteSearchAutosuggest | `Autosuggest` [_(ref)_](/components/autosuggest) | false | Sets the autosuggest functionality in the header |

## MastheadLogo

Expand Down Expand Up @@ -85,8 +86,9 @@
| ariaLabel | string | false | The `aria-label` attribute added to the `<nav>` element. Defaults to “Main menu”. |
| itemsList | array`<Item>` | true | Settings for an array of [list items](#item) for each navigation link |
| currentPath | string or array`<string>` | true | The path of the current active page. Multiple paths can be provided using an array to highlight nested navigation. |
| toggleButton | array`<ToggleButton>` | true | Settings for the navigation [menu toggle button](#togglebutton) displayed on small viewports |
| toggleNavigationButton | array`<ToggleButton>` | true | Settings for the navigation [menu toggle button](#togglebutton) displayed on small viewports |
| removeHorizontalSubNav | boolean | false | Set to “true” to remove the sub navigation |
| subNavigation | array`<subNavigation>` | false | Settings for the [sub navigation menu links](#subNavigation) |

## ToggleButton

Expand Down Expand Up @@ -115,3 +117,13 @@
| name | string | false | Sets the HTML `name` attribute for the `<button>`. Not valid if `url` is set. |
| url | string | false | If set, will create an HTML anchor link with the required classes and attributes |
| attributes | object | false | HTML attributes (for example, data attributes) to add to the button |

## SubNavigation

| Name | Type | Required | Description |
| ---------------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| id | string | true | The HTML `id` of the `<nav>` element. Used for the `aria-controls` attribute for the menu button displayed on small viewports. |
| ariaLabel | string | false | The `aria-label` attribute added to the `<nav>` element. Defaults to “Section menu”. |
| itemsList | array`<Item>` | true | Settings for an array of [list items](#item) for each navigation link |
| currentPath | string or array`<string>` | true | The path of the current active page. Multiple paths can be provided using an array to highlight nested navigation. |
| removeHorizontalSubNav | boolean | false | Set to “true” to remove the sub navigation |

0 comments on commit 882c690

Please sign in to comment.