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
feat(navbar-brand): New component <b-navbar-brand> #710
Conversation
Add explicit component for `<b-navbar-brand>`
lib/components/navbar-brand.vue
Outdated
</b-link> | ||
<div v-else :is="tag" class="navbar-brand"> | ||
<slot></slot> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be slightly more declarative just using the <component>
tag here. Shows it off clearly as a dynamic tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, was thinking that
<b-link v-if="isLink" | ||
class="navbar-brand" | ||
v-bind="linkProps" | ||
@click="$emit('click', $event)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we hit v2.4 as a peer dependency with Vue, we can start using v-bind="$attrs" v-on="$listeners"
to proxy everything off to link or whatever. And that is glorious!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Will be nice when that happens
New component for rendering navbar brand content.
Setting props
to
orhref
will render ab-link
.If both
to
andhref
are not present, then the navbar-brand will be resndered as adiv
by default (configurable via thetag
prop)