refactor: extract out component for date range

This commit is contained in:
Hussain Nagaria
2024-04-16 21:39:19 +05:30
parent f48f437075
commit 4ec57349f8
5 changed files with 52 additions and 42 deletions

View File

@@ -0,0 +1,22 @@
<template>
<div class="flex items-center">
<Calendar class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<span>
{{ getFormattedDateRange(props.startDate, props.endDate) }}
</span>
</div>
</template>
<script setup>
import { Calendar } from 'lucide-vue-next'
import { getFormattedDateRange } from '@/utils'
const props = defineProps({
startDate: {
type: String,
},
endDate: {
type: String,
},
})
</script>