File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { WalletMinimal } from 'lucide-react' ;
22import { cn } from '@/lib/utils' ;
3+ import { EMPTY_STATE_ILLUSTRATION_SIZES } from './emptyStateIllustration.config' ;
34
45interface CompactEmptyWalletStateProps {
56 title ?: string ;
@@ -19,8 +20,18 @@ const CompactEmptyWalletState: React.FC<CompactEmptyWalletStateProps> = ({
1920 className
2021 ) }
2122 >
22- < div className = "mt-0.5 rounded-lg bg-amber-300/20 p-1.5" >
23- < WalletMinimal className = "size-4 text-amber-200" />
23+ < div
24+ className = { cn (
25+ 'mt-0.5 flex items-center justify-center rounded-lg bg-amber-300/20' ,
26+ EMPTY_STATE_ILLUSTRATION_SIZES . compactBadgeFrame
27+ ) }
28+ >
29+ < WalletMinimal
30+ className = { cn (
31+ 'text-amber-200' ,
32+ EMPTY_STATE_ILLUSTRATION_SIZES . compactBadgeIcon
33+ ) }
34+ />
2435 </ div >
2536 < div >
2637 < p className = "text-sm font-semibold text-amber-100" > { title } </ p >
Original file line number Diff line number Diff line change 11import { cn } from '@/lib/utils' ;
22import { Button } from '@/components/ui/button' ;
33import { RotateCcw } from 'lucide-react' ;
4+ import { EMPTY_STATE_ILLUSTRATION_SIZES } from './emptyStateIllustration.config' ;
45
56interface EmptyStateProps {
67 image : string ;
@@ -26,11 +27,19 @@ const EmptyState: React.FC<EmptyStateProps> = ({
2627 role = "status"
2728 aria-label = { title }
2829 >
29- < div className = "relative mb-6" >
30+ < div
31+ className = { cn (
32+ 'relative mb-6 flex items-center justify-center' ,
33+ EMPTY_STATE_ILLUSTRATION_SIZES . heroFrame
34+ ) }
35+ >
3036 < div className = "absolute inset-0 size-full rounded-full bg-amber-500/10 blur-2xl" />
3137 < img
3238 src = { image }
33- className = "relative z-10 size-[180px] object-contain opacity-60 grayscale transition-all duration-500 hover:opacity-80 hover:grayscale-0"
39+ className = { cn (
40+ 'relative z-10 opacity-60 grayscale transition-all duration-500 hover:opacity-80 hover:grayscale-0' ,
41+ EMPTY_STATE_ILLUSTRATION_SIZES . heroVisual
42+ ) }
3443 alt = ""
3544 aria-hidden = "true"
3645 />
Original file line number Diff line number Diff line change 1+ export const EMPTY_STATE_ILLUSTRATION_SIZES = {
2+ heroFrame : 'size-36 sm:size-40 md:size-44' ,
3+ heroVisual : 'size-full object-contain' ,
4+ compactBadgeFrame : 'size-8 shrink-0' ,
5+ compactBadgeIcon : 'size-4' ,
6+ panelBadgeFrame : 'size-11 shrink-0' ,
7+ panelBadgeIcon : 'size-5' ,
8+ } as const ;
You can’t perform that action at this time.
0 commit comments