Skip to content

b-button: Remove warning by importing b-link #201

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 1 commit into from
Apr 6, 2017
Merged
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
7 changes: 6 additions & 1 deletion lib/components/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
</template>

<script>
import bLink from './link.vue';

export default {
components: {
bLink
},
computed: {
classObject() {
return [
Expand All @@ -18,7 +23,7 @@
];
},
componentType() {
return (this.href || this.to) ? 'b-link' : 'button';
return (this.href || this.to) ? bLink : 'button';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you have to keep this as is (b-link) as kebab case is preferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a string. It's a variable name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't take time to explain the reasoning as it's the same as #174

Copy link
Member

@mosinve mosinve Apr 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gpyh,
comparing to #174, this piece specially omitted or forgotten?

    components:{
        bLink
    },

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually doesn't need the component to be registered as it uses directly its description.
It's still a good idea to add it though. I'll do that.

},
btnBlock() {
return this.block ? `btn-block` : '';
Expand Down