We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 069cef6 commit 290e202Copy full SHA for 290e202
tests/__tests__/components/Button.vue
@@ -1,25 +1,13 @@
1
<template>
2
- <button :class="typeClass" @click="handleClick">{{ text }}</button>
+ <button @click="handleClick">{{ text }}</button>
3
</template>
4
5
<script>
6
export default {
7
props: {
8
text: {
9
type: String,
10
- default: ''
11
- },
12
- type: {
13
- validator: value => ['primary', 'secondary'].includes(value),
14
- default: 'primary'
15
- }
16
17
- computed: {
18
- typeClass: function() {
19
- if (this.type) {
20
- return `button button--${this.type}`
21
22
- return 'button'
+ required: true
23
}
24
},
25
methods: {
0 commit comments