Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
add subnav api
Browse files Browse the repository at this point in the history
  • Loading branch information
SiAdcock committed May 13, 2022
1 parent 9dd5750 commit f33c6cf
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/rfcs/header-component-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,46 @@ A visually prominent navigational link that appears in the `Navigation.Secondary
- `label` _string_
- display label of the `Navigation.SecondaryLinksSupplementalLink`

### `<Subnav />`

A navigation for sub-categories below the current top-level category.

![Subnav](images/header-component-api/subnav.png)

#### Example

```jsx
<Subnav>
<Subnav.Link
label="UK"
href="https://www.theguardian.com/uk"
/ >
<Subnav.Link
label="World"
href="https://www.theguardian.com/world"
/ >
<Subnav/>
```

#### `<Subnav.Link />`

A navigational link that appears in the `Subnav` component

![Subnav](images/header-component-api/subnav-link.png)

##### Example

```jsx
<Subnav.Link label="UK politics" href="https://www.theguardian.com/politics" />
```

##### Props

- `href` _string_
- navigation location when `Subnav.Link` is clicked
- `label` _string_
- display label of the `Subnav.Link`

## Specialised headers

### `<EditorialHeader />`
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rfcs/images/header-component-api/subnav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f33c6cf

Please sign in to comment.