replace with shadcn card component
This commit is contained in:
parent
d8545d197d
commit
9ea94d3703
1 changed files with 14 additions and 7 deletions
|
|
@ -1,6 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { type DirectoryItem } from '@/types/directory'
|
import { type DirectoryItem } from '@/types/directory'
|
||||||
import { MapPin, Phone, ExternalLink, Zap, MessageCircle } from 'lucide-vue-next'
|
import { MapPin, Phone, ExternalLink, Zap, MessageCircle } from 'lucide-vue-next'
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
CardDescription,
|
||||||
|
} from '@/components/ui/card'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
item: DirectoryItem
|
item: DirectoryItem
|
||||||
|
|
@ -16,8 +23,8 @@ const categoryColors = {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-lg border bg-card text-card-foreground shadow-sm hover:shadow-md transition-shadow">
|
<Card class="hover:shadow-md transition-shadow">
|
||||||
<div class="p-6 space-y-4">
|
<CardContent class="p-6 space-y-4">
|
||||||
<!-- Image -->
|
<!-- Image -->
|
||||||
<div v-if="item.imageUrl" class="aspect-video w-full overflow-hidden rounded-md">
|
<div v-if="item.imageUrl" class="aspect-video w-full overflow-hidden rounded-md">
|
||||||
<img :src="item.imageUrl" :alt="item.name" class="h-full w-full object-cover" />
|
<img :src="item.imageUrl" :alt="item.name" class="h-full w-full object-cover" />
|
||||||
|
|
@ -26,15 +33,15 @@ const categoryColors = {
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
<div class="flex items-start justify-between">
|
<div class="flex items-start justify-between">
|
||||||
<h3 class="font-semibold text-lg">{{ item.name }}</h3>
|
<CardTitle>{{ item.name }}</CardTitle>
|
||||||
<span class="rounded-full px-2.5 py-0.5 text-xs font-semibold" :class="categoryColors[item.category]">
|
<span class="rounded-full px-2.5 py-0.5 text-xs font-semibold" :class="categoryColors[item.category]">
|
||||||
{{ item.category }}
|
{{ item.category }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="text-sm text-muted-foreground">
|
<CardDescription>
|
||||||
{{ item.description }}
|
{{ item.description }}
|
||||||
</p>
|
</CardDescription>
|
||||||
|
|
||||||
<!-- Contact Info -->
|
<!-- Contact Info -->
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
|
|
@ -78,6 +85,6 @@ const categoryColors = {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</CardContent>
|
||||||
</div>
|
</Card>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue