1
1
import { ArrowUpRight } from 'lucide-react'
2
2
import { useMediaQuery } from '@/hooks/useMediaQuery'
3
3
import { Badge } from '@/components/ui/Badge'
4
+ import BlurFade , { BLUR_FADE_DELAY } from '@/components/ui/BlurFade' ;
5
+ import { Icon } from '@iconify/react' ;
6
+ import { techIcons } from '@/lib/techIcons' ;
4
7
5
- export type ProjectTileProps = {
8
+ type ProjectTileDetailProps = {
6
9
title : string
7
10
description : string
8
11
repo : boolean ,
@@ -12,7 +15,11 @@ export type ProjectTileProps = {
12
15
techStack : string [ ]
13
16
}
14
17
15
- export function ProjectTile ( { title, description, repo, repoUrl, live, liveUrl, techStack } : ProjectTileProps ) {
18
+ export type ProjectTileProps = ProjectTileDetailProps & {
19
+ delayTime : number ;
20
+ } ;
21
+
22
+ export function ProjectTile ( { delayTime, title, description, repo, repoUrl, live, liveUrl, techStack } : ProjectTileProps ) {
16
23
const isDesktop = useMediaQuery ( '(min-width: 768px)' )
17
24
return (
18
25
< div className = "items-center" >
@@ -41,9 +48,22 @@ export function ProjectTile({ title, description, repo, repoUrl, live, liveUrl,
41
48
</ div >
42
49
< p className = "text-gray-700 dark:text-gray-300" > { description } </ p >
43
50
{ techStack && techStack . length > 0 && (
44
- < div className = "mt-1 flex flex-wrap gap-1" >
51
+ < div className = "mt-3 flex flex-wrap gap-1" >
45
52
{ techStack . map ( ( skillText , index ) => (
46
- < Badge key = { index } variant = { `secondary` } > { skillText } </ Badge >
53
+ < BlurFade
54
+ key = { index }
55
+ delay = { delayTime + index * 0.05 }
56
+ >
57
+ < Badge key = { index } variant = { `secondary` } >
58
+ {
59
+ techIcons ?. [ skillText ] &&
60
+ < span className = "mr-2" > {
61
+ < Icon icon = { techIcons [ skillText ] } inline = { true } width = { 18 } height = { 18 } />
62
+ } </ span >
63
+ }
64
+ < span > { skillText } </ span >
65
+ </ Badge >
66
+ </ BlurFade >
47
67
) ) }
48
68
</ div >
49
69
) }
0 commit comments