feat: Utilizando Vue em um projeto e entendendo estrutura
This commit is contained in:
20
task-tracker/src/components/Button.vue
Normal file
20
task-tracker/src/components/Button.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<button @click="onClick()" :style="{backgroundColor: color}" class="btn">Add Task</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppButton',
|
||||
props: {
|
||||
text: String,
|
||||
color: String
|
||||
},
|
||||
methods: {
|
||||
onClick () {
|
||||
console.log('Click')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user