This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/components/misc/Done.vue

42 lines
663 B
Vue

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