2020-11-24 15:15:51 +05:30
|
|
|
<script>
|
|
|
|
import { GlButton } from '@gitlab/ui';
|
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlButton,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
isTodo: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
buttonLabel() {
|
2021-03-11 19:13:27 +05:30
|
|
|
return this.isTodo ? __('Mark as done') : __('Add a to do');
|
2020-11-24 15:15:51 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<gl-button v-bind="$attrs" :aria-label="buttonLabel" @click="$emit('click', $event)">
|
|
|
|
{{ buttonLabel }}
|
|
|
|
</gl-button>
|
|
|
|
</template>
|