|
|
|
<script setup lang="ts">
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
name: string;
|
|
|
|
date?: string;
|
|
|
|
color?: string;
|
|
|
|
showDate?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
|
name: '',
|
|
|
|
date: '',
|
|
|
|
color: 'blue',
|
|
|
|
showDate: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div :class="{
|
|
|
|
'bg-maroon-50': props.color === 'maroon',
|
|
|
|
'bg-blue-50': props.color === 'blue',
|
|
|
|
'bg-green-50': props.color === 'green',
|
|
|
|
'bg-yellow-50': props.color === 'yellow',
|
|
|
|
'bg-pink-50': props.color === 'pink',
|
|
|
|
'bg-purple-50': props.color === 'purple',
|
|
|
|
}" class="flex w-full border-1 h-8 cursor-pointer border-gray-200 gap-2 items-center px-2 py-3 rounded-lg">
|
|
|
|
<span :class="{
|
|
|
|
'bg-maroon-500': props.color === 'maroon',
|
|
|
|
'bg-blue-500': props.color === 'blue',
|
|
|
|
'bg-green-500': props.color === 'green',
|
|
|
|
'bg-yellow-500': props.color === 'yellow',
|
|
|
|
'bg-pink-500': props.color === 'pink',
|
|
|
|
'bg-purple-500': props.color === 'purple',
|
|
|
|
}" class="block h-5 w-1 rounded"></span>
|
|
|
|
<span class="text-sm font-bold text-gray-800">{{name}}</span>
|
|
|
|
<span v-if="showDate" class="text-xs text-gray-600">{{date}}</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
</style>
|