|
|
@ -1,10 +1,11 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script lang="ts" setup> |
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
name: string |
|
|
|
name: string |
|
|
|
date?: string |
|
|
|
date?: string |
|
|
|
color?: string |
|
|
|
color?: string |
|
|
|
size?: 'small' | 'medium' | 'large' |
|
|
|
size?: 'small' | 'medium' | 'large' |
|
|
|
showDate?: boolean |
|
|
|
showDate?: boolean |
|
|
|
|
|
|
|
position?: 'leftRounded' | 'rightRounded' | 'rounded' | 'none' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), { |
|
|
|
const props = withDefaults(defineProps<Props>(), { |
|
|
@ -13,10 +14,22 @@ const props = withDefaults(defineProps<Props>(), { |
|
|
|
color: 'blue', |
|
|
|
color: 'blue', |
|
|
|
size: 'small', |
|
|
|
size: 'small', |
|
|
|
showDate: true, |
|
|
|
showDate: true, |
|
|
|
|
|
|
|
position: 'rounded', |
|
|
|
}) |
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'h-12': props.size === 'medium', |
|
|
|
|
|
|
|
'h-16': props.size === 'large', |
|
|
|
|
|
|
|
'h-8': props.size === 'small', |
|
|
|
|
|
|
|
'pr-2': props.position === 'leftRounded', |
|
|
|
|
|
|
|
'pl-2': props.position === 'rightRounded', |
|
|
|
|
|
|
|
'px-2': props.position === 'rounded', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
class="w-full gap-2" |
|
|
|
|
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
'bg-maroon-50': props.color === 'maroon', |
|
|
|
'bg-maroon-50': props.color === 'maroon', |
|
|
@ -25,11 +38,12 @@ const props = withDefaults(defineProps<Props>(), { |
|
|
|
'bg-yellow-50': props.color === 'yellow', |
|
|
|
'bg-yellow-50': props.color === 'yellow', |
|
|
|
'bg-pink-50': props.color === 'pink', |
|
|
|
'bg-pink-50': props.color === 'pink', |
|
|
|
'bg-purple-50': props.color === 'purple', |
|
|
|
'bg-purple-50': props.color === 'purple', |
|
|
|
'h-12': props.size === 'medium', |
|
|
|
'rounded-l-lg': props.position === 'leftRounded', |
|
|
|
'h-16': props.size === 'large', |
|
|
|
'rounded-r-lg': props.position === 'rightRounded', |
|
|
|
'h-8': props.size === 'small', |
|
|
|
'rounded-lg': props.position === 'rounded', |
|
|
|
|
|
|
|
'rounded-none': props.position === 'none', |
|
|
|
}" |
|
|
|
}" |
|
|
|
class="flex items-center w-full border-1 cursor-pointer border-gray-200 gap-2 items-center px-2 py-3 rounded-lg" |
|
|
|
class="flex items-center border-1 px-2 cursor-pointer border-gray-200 py-2" |
|
|
|
> |
|
|
|
> |
|
|
|
<span |
|
|
|
<span |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
@ -40,13 +54,14 @@ const props = withDefaults(defineProps<Props>(), { |
|
|
|
'bg-pink-500': props.color === 'pink', |
|
|
|
'bg-pink-500': props.color === 'pink', |
|
|
|
'bg-purple-500': props.color === 'purple', |
|
|
|
'bg-purple-500': props.color === 'purple', |
|
|
|
}" |
|
|
|
}" |
|
|
|
class="block h-5 w-1 rounded" |
|
|
|
class="block h-5 w-1 rounded mr-2" |
|
|
|
></span> |
|
|
|
></span> |
|
|
|
<div class="flex flex-row items-baseline gap-2"> |
|
|
|
<div class="flex flex-row items-baseline gap-2"> |
|
|
|
<span class="text-sm font-bold text-gray-800">{{ name }}</span> |
|
|
|
<span class="text-sm font-bold text-gray-800">{{ name }}</span> |
|
|
|
<span v-if="showDate" class="text-xs text-gray-600">{{ date }}</span> |
|
|
|
<span v-if="showDate" class="text-xs text-gray-600">{{ date }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style> |
|
|
|
<style lang="scss" scoped></style> |
|
|
|