File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 1- import  {  useState  }  from  'react' 
1+ import  {  type   JSX ,   useState  }  from  'react' 
22import  {  twMerge  }  from  'tailwind-merge' 
33import  type  {  VariantProps  }  from  'tailwind-variants' 
4- import  {  badgeCVA ,  typeColors ,  typeIcons ,  typeTooltips  }  from  '@/components/design' 
4+ import  {  badgeCVA ,  typeColors ,  typeIcons  }  from  '@/components/design' 
5+ 
6+ import  {  CodePreview  }  from  './BadgePreviews/CodePreview' 
7+ import  {  ImagePreview  }  from  './BadgePreviews/ImagePreview' 
8+ import  {  LinkPreview  }  from  './BadgePreviews/LinkPreview' 
9+ import  {  TextPreview  }  from  './BadgePreviews/TextPreview' 
10+ import  {  TimePreview  }  from  './BadgePreviews/TimePreview' 
11+ 
12+ const  typeTooltips  =  { 
13+   code : CodePreview , 
14+   image : ImagePreview , 
15+   link : LinkPreview , 
16+   text : TextPreview , 
17+   time : TimePreview , 
18+ }  satisfies  Partial < Record < keyof  typeof  typeIcons ,  ( )  =>  JSX . Element > > 
519
620export  type  BadgeProps  =  VariantProps < typeof  badgeCVA >  &  { 
721  type : keyof  typeof  typeIcons 
Original file line number Diff line number Diff line change @@ -11,13 +11,7 @@ import {
1111  TextSelect , 
1212  Trash2 , 
1313}  from  'lucide-react' 
14- import  type  {  JSX  }  from  'react' 
1514import  {  tv  }  from  'tailwind-variants' 
16- import  {  CodePreview  }  from  './BadgePreviews/CodePreview' 
17- import  {  ImagePreview  }  from  './BadgePreviews/ImagePreview' 
18- import  {  LinkPreview  }  from  './BadgePreviews/LinkPreview' 
19- import  {  TextPreview  }  from  './BadgePreviews/TextPreview' 
20- import  {  TimePreview  }  from  './BadgePreviews/TimePreview' 
2115
2216// Map types to their icons - source of truth for badge types 
2317export  const  typeIcons  =  { 
@@ -69,11 +63,3 @@ export const badgeCVA = tv({
6963    type : typeColors , 
7064  } , 
7165} ) 
72- 
73- export  const  typeTooltips  =  { 
74-   code : CodePreview , 
75-   image : ImagePreview , 
76-   link : LinkPreview , 
77-   text : TextPreview , 
78-   time : TimePreview , 
79- }  satisfies  Partial < Record < keyof  typeof  typeIcons ,  ( )  =>  JSX . Element  |  undefined > > 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments