@@ -47,7 +47,7 @@ const Wrapper = styled.div`
47
47
font-size: 13px;
48
48
line-height: 1.5;
49
49
color: grey;
50
- margin-bottom: 8px ;
50
+ margin-bottom: 12px ;
51
51
}
52
52
53
53
.section {
@@ -567,11 +567,44 @@ const ComponentButton = (props: {
567
567
return (
568
568
< Tooltip title = { props . path } placement = "top" >
569
569
< DataSourceButton onClick = { handleClick } >
570
- < div style = { { display : "flex" , alignItems : "center" , gap : "8px" } } >
571
- { Icon && < Icon style = { { width : "32px" } } /> }
572
- < div >
573
- < div style = { { fontSize : "14px" , fontWeight : "bold" } } > { props . componentName } </ div >
574
- < div style = { { fontSize : "12px" , fontWeight : "400" } } > { props . componentType } </ div >
570
+ < div style = { { display : "flex" , alignItems : "flex-start" , gap : "5px" , width : "100%" } } >
571
+ < div style = { { flex : 1 } } >
572
+ { Icon && (
573
+ < Icon style = { { margin : "0px" , width : "32px" } } />
574
+ ) }
575
+ </ div >
576
+ < div style = { { flex : 2 , overflow : "hidden" , textOverflow : "ellipsis" , whiteSpace : "nowrap" } } >
577
+ < div
578
+ style = { {
579
+ marginTop : "5px" ,
580
+ fontSize : "14px" ,
581
+ fontWeight : "bold" ,
582
+ maxWidth : "100%" ,
583
+ overflow : "hidden" ,
584
+ textOverflow : "ellipsis" ,
585
+ whiteSpace : "nowrap" ,
586
+ } }
587
+ title = { props . componentName } // Tooltip to show full name on hover
588
+ >
589
+ { props . componentName ?. length > 100
590
+ ? `${ props . componentName . slice ( 0 , 100 ) } ...`
591
+ : props . componentName }
592
+ </ div >
593
+ < div
594
+ style = { {
595
+ fontSize : "12px" ,
596
+ fontWeight : "400" ,
597
+ maxWidth : "100%" ,
598
+ overflow : "hidden" ,
599
+ textOverflow : "ellipsis" ,
600
+ whiteSpace : "nowrap" ,
601
+ } }
602
+ title = { props . componentType } // Tooltip for type too
603
+ >
604
+ { props . componentType ?. length > 100
605
+ ? `${ props . componentType . slice ( 0 , 100 ) } ...`
606
+ : props . componentType }
607
+ </ div >
575
608
</ div >
576
609
</ div >
577
610
</ DataSourceButton >
0 commit comments