Skip to content

Commit

Permalink
fix: props and attrs not set correctly on buttons MP-858
Browse files Browse the repository at this point in the history
  • Loading branch information
emuvente committed Sep 26, 2024
1 parent 66ecd71 commit 92faca3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/components/15Years/15YearsButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ export default {
render() {
const options = {
class: ['fifteen-yr-button', this.variant ? `fifteen-yr-button--${this.variant}` : ''],
props: {},
attrs: {},
on: { click: this.onClick },
};
if (this.to) {
options.props.to = this.to;
options.to = this.to;
}
if (this.href) {
options.attrs.href = this.href;
options.href = this.href;
}
return h(this.tag, options, this.$slots.default());
},
Expand Down
6 changes: 2 additions & 4 deletions src/components/Kv/KvButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ export default {
render() {
const options = {
class: { button: true },
props: {},
attrs: {},
};
if (this.to) {
options.props.to = this.to;
options.to = this.to;
}
if (this.href) {
options.attrs.href = this.href;
options.href = this.href;
}
return h(this.tag, options, this.$slots.default());
},
Expand Down

0 comments on commit 92faca3

Please sign in to comment.