Nuxt/examples/jest-vtu-example/components/Btn/Btn.vue
Paul Gascou-Vaillancourt 5c0d12fb13 chore(examples): Add Jest + Vue Test Utils example (#4116)
* chore(examples): Add Jest + Vue Test Utils example

* style: Lint

* refactor: Rename button component & fix lint errors

* refactor: Use export default

* refactor: Babel 7 setup
2018-10-25 19:42:21 +02:00

26 lines
327 B
Vue

<template>
<button @click="handleClick">
{{ label }}
</button>
</template>
<script>
export default {
name: 'Button',
props: {
label: {
type: String,
required: true
}
},
data: () => ({
clicked: false
}),
methods: {
handleClick() {
this.clicked = true
}
}
}
</script>