2021-09-21 11:29:40 +02:00
|
|
|
<template>
|
|
|
|
<div
|
2021-12-04 15:47:32 +01:00
|
|
|
v-if="isDone"
|
|
|
|
class="is-done"
|
|
|
|
:class="{ 'is-done--small': variant === 'small' }"
|
|
|
|
>
|
|
|
|
{{ $t('task.attributes.done') }}
|
|
|
|
</div>
|
2021-09-21 11:29:40 +02:00
|
|
|
</template>
|
|
|
|
|
2021-12-04 15:47:32 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import {PropType} from 'vue'
|
|
|
|
type Variants = 'default' | 'small'
|
2021-09-21 11:29:40 +02:00
|
|
|
|
2021-12-04 15:47:32 +01:00
|
|
|
defineProps({
|
|
|
|
isDone: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
2021-09-21 11:29:40 +02:00
|
|
|
},
|
2021-12-04 15:47:32 +01:00
|
|
|
variant: {
|
|
|
|
type: String as PropType<Variants>,
|
|
|
|
default: 'default',
|
2021-09-21 11:29:40 +02:00
|
|
|
},
|
2021-12-04 15:47:32 +01:00
|
|
|
})
|
2021-09-21 11:29:40 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.is-done {
|
2021-11-22 22:12:54 +01:00
|
|
|
background: var(--success);
|
|
|
|
color: var(--white);
|
2021-09-21 11:29:40 +02:00
|
|
|
padding: .5rem;
|
|
|
|
font-weight: bold;
|
|
|
|
line-height: 1;
|
|
|
|
border-radius: 4px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.is-done--small {
|
|
|
|
padding: .2rem .3rem;
|
|
|
|
}
|
|
|
|
</style>
|