Skip to content
Snippets Groups Projects
Select Git revision
  • 04d2105cb23e977b219780e71c8a754e0c6ccc76
  • main default protected
2 results

Button.vue

Blame
  • Button.vue 468 B
    <template>
        <button @click="onClick()" 
        v-bind:style="{background: color}" 
        class="btn">{{text}}</button>
    </template>
    
    <script>
    export default {
        name: "Button",
        props: {
            text: {
                type: String,
                default: "Add Task",
            },
            color: {
                type: String,
                default: "black",
            },
        },
        methods: {
            onClick() {
                this.$emit('btn-click');
            },
        },
    };
    </script>