Skip to content

Commit

Permalink
docs(README): Document collapseAtCount.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfreestone committed Jun 13, 2019
1 parent b3e3dcb commit 12f259d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ inst.toggleOverflowNav();

## Options

### `collapseAtCount`

If you'd like to collapse into the overflow when the primary navigation becomes depleted, you can do with the `collapseAtCount` option:

```javascript
priorityPlus(document.querySelector('.js-p-target'), {
collapseAtCount: 2,
});
```

The above will move all menu items into the overflow if only two can 'fit' into the primary. This is essentially a way to avoid orphan nav items.

### Classes
If you'd like to override the default classes, you can pass in a `classNames` object like so:

Expand Down Expand Up @@ -271,4 +283,4 @@ If your menu is part of an auto-sized flex-child, it will probably need a positi
.site-header__nav {
flex-grow: 1;
}
```
```

0 comments on commit 12f259d

Please sign in to comment.