8000 docs(b-navbar): specify support of sidebar + array (#5885) · bootstrap-vue/bootstrap-vue@21e0980 · GitHub
[go: up one dir, main page]

Skip to content

Commit 21e0980

Browse files
Hiwsjacobmllr95
andauthored
docs(b-navbar): specify support of sidebar + array (#5885)
* specify support of sidebar + array * update package.json * Update navbar-toggle.js * Update README.md Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
1 parent 910d04f commit 21e0980

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/components/navbar/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,10 @@ Internally, `<b-navbar-toggle>` uses the [`v-b-toggle` directive](/docs/directiv
292292
`<b-navbar-toggle>` renders the default Bootstrap v4 _hamburger_ (which is a background SVG image).
293293
You can supply your own content (such as an icon) via the optionally scoped `default` slot. The
294294
default slot scope contains the property `expanded`, which will be `true` when the collapse is
295-
expanded, or `false` when the collapse is collapsed. You can use this to swap the toggle content
296-
based on the collapse state:
295+
expanded, or `false` when the collapse is collapsed.
296+
297+
Note that the `expanded` scope property only works when supplying the `target` prop as a `string`,
298+
and not an `array`.
297299

298300
```html
299301
<template>

src/components/navbar/navbar-toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const BNavbarToggle = /*#__PURE__*/ Vue.extend({
2222
default: () => getComponentConfig(NAME_NAVBAR_TOGGLE, 'label')
2323
},
2424
target: {
25-
type: String,
25+
type: [Array, String],
2626
required: true
2727
},
2828
disabled: {

src/components/navbar/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"props": [
7272
{
7373
"prop": "target",
74-
"description": "ID of the collapse the toggle controls"
74+
"description": "ID (or array of IDs) of the collapse/sidebar components that should be toggled"
7575
},
7676
{
7777
"prop": "label",

0 commit comments

Comments
 (0)
0