Skip to content
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

Merged
merged 6 commits into from Jul 19, 2017

Conversation

tmorehouse
Copy link
Member

New component for rendering navbar brand content.

Setting props to or href will render a b-link.

If both to and href are not present, then the navbar-brand will be resndered as a div by default (configurable via the tag prop)

</b-link>
<div v-else :is="tag" class="navbar-brand">
<slot></slot>
</div>
Copy link
Member

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.

Copy link
Member Author

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)">
Copy link
Member

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!

Copy link
Member Author

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

@tmorehouse tmorehouse merged commit 721292c into master Jul 19, 2017
@tmorehouse tmorehouse deleted the tmorehouse-navbar-brand branch July 19, 2017 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants