File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const Element = styled.div<ElementProps>`
2222    color: ${ ( {  theme } )  =>  theme . titleColor }  
2323  } 
2424  ${ ( {  onClick,  href,  theme,  to } )  =>  
25-     ( onClick  ||  href  ||  to )  
25+     onClick  ||  href  ||  to  
2626      ? `  
2727    transition: box-shadow ${ time . s } ${ time . s }  
2828    &:hover { 
@@ -32,18 +32,26 @@ const Element = styled.div<ElementProps>`
3232      : `` }  ;
3333` ; 
3434
35- interface  TileProps < C  extends  React . ElementType >  { 
36-   as ?: C 
35+ interface  TileProps < C  extends  React . ElementType > 
36+   extends  React . PropsWithChildren  { 
37+   as ?: C ; 
3738  space : SpaceValue ; 
39+   // TODO: add `to` and `href` props, but only when `as` is Link or `a` 
3840} 
3941
40- const  Tile  =  < C  extends  React . ElementType  =  "div" > ( {  space,  ...props  } : TileProps < C > )  =>  ( 
42+ const  Tile  =  < C  extends  React . ElementType  =  "div" > ( { 
43+   space, 
44+   children, 
45+   ...props 
46+ } : TileProps < C > )  =>  ( 
4147  < SharedHexConsumer > 
4248    { ( {  BIFHEX  } )  =>  ( 
4349      < ThemeProvider 
4450        theme = { {  ...whiteThm ,  actionColor : BIFHEX ,  decor : BIFHEX  } } 
4551      > 
46-         < Element  $space = { space }  { ...props }  /> 
52+         < Element  $space = { space }  { ...props } > 
53+           { children } 
54+         </ Element > 
4755      </ ThemeProvider > 
4856    ) } 
4957  </ SharedHexConsumer > 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments