File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ import { StaticImageData } from 'next/dist/shared/lib/get-img-props' ;
2+ import Image from 'next/image' ;
3+ import Link from 'next/link' ;
4+
5+ export function Card ( {
6+ href,
7+ image,
8+ imageAlt,
9+ title,
10+ description,
11+ className = '' ,
12+ } : {
13+ description : string ;
14+ href : string ;
15+ image : string | StaticImageData ;
16+ imageAlt : string ;
17+ title : string ;
18+ className ?: string ;
19+ } ) {
20+ return (
21+ < Link href = { href } className = { className } >
22+ < div className = "flex flex-col md:flex-row shadow dark:bg-[var(--gray-4)] p-6 rounded gap-4 h-full" >
23+ < Image src = { image } height = { 64 } alt = { imageAlt } className = "object-contain" />
24+ < div className = "flex flex-col justify-center space-y-2" >
25+ < h3 className = "text-xl font-medium" > { title } </ h3 >
26+ < p > { description } </ p >
27+ </ div >
28+ </ div >
29+ </ Link >
30+ ) ;
31+ }
You can’t perform that action at this time.
0 commit comments