10000 docs(b-navbar): specify support of sidebar + array by Hiws · Pull Request #5885 · bootstrap-vue/bootstrap-vue · GitHub
[go: up one dir, main page]

Skip to content

docs(b-navbar): specify support of sidebar + array #5885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/navbar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,10 @@ Internally, `<b-navbar-toggle>` uses the [`v-b-toggle` directive](/docs/directiv
`<b-navbar-toggle>` renders the default Bootstrap v4 _hamburger_ (which is a background SVG image).
You can supply your own content (such as an icon) via the optionally scoped `default` slot. The
default slot scope contains the property `expanded`, which will be `true` when the collapse is
expanded, or `false` when the collapse is collapsed. You can use this to swap the toggle content
based on the collapse state:
expanded, or `false` when the collapse is collapsed.

Note that the `expanded` scope property only works when supplying the `target` prop as a `string`,
and not an `array`.

```html
<template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/navbar/navbar-toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const BNavbarToggle = /*#__PURE__*/ Vue.extend({
default: () => getComponentConfig(NAME_NAVBAR_TOGGLE, 'label')
},
target: {
type: String,
type: [Array, String],
required: true
},
disabled: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/navbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"props": [
{
"prop": "target",
"description": "ID of the collapse the toggle controls"
"description": "ID (or array of IDs) of the collapse/sidebar components that should be toggled"
},
{
"prop": "label",
Expand Down
0